Home › Forums › Add-ons › Repeater Field › Output repeater field as table › Reply To: Output repeater field as table
With something like this you’d really be better off using something like a custom post type for products and a custom taxonomy for product category. If you’re going to have a lot of products and categories then trying use a repeater will eventually get out of hand and will prevent you from having flexibility in the future to make improvements.
That being said…
Is “product_category” a repeater or some other type of field? You have called twice
<h2><?php the_sub_field('product_category'); ?></h2>
<?php if( have_rows('product_category') ): ?>
Other than that I don’t see anything in your code that is a problem except the use of smart quotes ‘product_notes’
which will cause a PHP error.
The first indicates a field like a text field an the second is using it as a repeater.
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.