Home › Forums › ACF PRO › Displaying data in table for different records › Reply To: Displaying data in table for different records
Hi John,
I’ve been playing around with templates (unacquainted when I posted before) and as happens with these things it comes together and makes more sense. Rather than trying to create the whole solution in ACF I realize that instead it is more flexible for me to create the table markup in the template and just call in individual ACF text fields that have the value I want.
I have 1 text field for each of the left columns labels and the assortment of fields I need for the values in the right column of the table. These values are being shown in the templates table cells where needed using the ‘is_page’ WordPress conditional statement at this stage and the page/s that represent my products are all displaying great and in the last several week my ACF has become overloaded with all types of content from one word text expressions to sentences to multiple sentences, repeaters, tables, images, galleries etc etc and the functions. I don’t think I’ve learned so much in a short time before! Before this I was starting to think it’s impossible to have a decent website now I feel like a shoo-in.
If I use the repeater I need to accept the repeater ‘as is’ don’t I (as it is laid out in ACF). The template requires the table code anyway. But the repeater is good if it is used as a block for many different products. In fact as many of my products are the same I am simply calling a complete repeater for many straight out of ACF. But when the values in the table start becoming different it will behoove me to call in each of the text fields in the other arrangement, rather than having lots of different repeaters that have duplicate data.
The is_page setup seems quite basic and long-winded but for a non-coder like me, now I’ve investigated it, is dead easy and I understand it’s robust. I’ve replaced some other unreliable functions like the http referrer by simply creating additional WordPress pages and using the is_page conditional tag. this way I can use the ACF fields accordingly. I don’t think I can use session variables from the product pages as they are done from another shopping cart plugin and it make updating hard or something.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.