Home Forums General Issues How to create archive page of ACF fields Reply To: How to create archive page of ACF fields

  • I can’t give you specifics, only a general idea.

    First you need to create a new rewrite rule in WP, for example if you want to have something like The rewrite rule would be almost identical to the existing rule for the product and it would load the same template You’d also need to add a variable for “datasheets” so that you can check it later.

    The rewrite rule would look something like (and this is only a guess):


    documentation for adding the query_var can be found here

    Then, in the single product template file you’d need to check for the value, something like this

    $datasheets = intval(get_query_var('datasheets', 0));
    if ($datasheets) {
      // show the datasheets
    } else {
      // show something else