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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.