Support

Account

Home Forums ACF PRO Creating a Single Pages/Posts from Repeater Field Rows Reply To: Creating a Single Pages/Posts from Repeater Field Rows

  • The best solution would be to create another custom post type for products and then use a relationship field to add products to each catalog.

    There isn’t any real solution to create a separate page for each product, at least nothing easy. The following is an inefficient way to accomplish this.

    first you would need to link to the page that is showing the catalog and use a query parameter to specify the product

    href="${current_page_url}?product={$url_safe_product_name}"

    The next step would be to test to see if that parameter is set

    
    if (!isset($_GET['product'])) {
      // show just one product
    } else {
      // normal page display here
    }
    

    where I have added // show just one product you would need to loop through the repeater, find the row that matches the value of the $_GET parameter and have different code to display that row.