Home › Forums › Front-end Issues › ACF Front End Display is Wierd
I am having some weird issue with ACF plugin on few pages. Let me narrate what am I trying to achieve with it.
Basically, I am using a clipper theme from appthemes. They have a custom taxonomy called “Stores” and “Coupon Category”. I am using ACF on these taxonomies to display a description at the end of the respective page.
For example, let’s say I have two stores named “Snapdeal coupons” and “Foodpanda coupons”. What I am trying to achieve with ACF is displaying bottom description below the above two stores. So when you open a “Foodpanda stores”, you will see a description about Foodpanda website and what is offers (through ACF plugin).
The above ACF integration works nicely on many of the pages but in case of “Foodpanda coupon” stores, it displays the description of “Snapdeal coupon” store which is weird. Live example can be see here: https://offcoupon.in/store/foodpanda-coupons/ (scroll down a bit after you see all the active and inactive coupons)
The same issue arises on all “Coupon category” taxonomy. In all “Coupon category” taxonomy, the description is shown randomly.
Let me know if you need more clarification or examples. I can even provide video proof if needed
Can you show us how you have the ACF fields set up, and how you’re pulling the info in your template?
If you haven’t, I would recommend reading over the
get_field documentation here – especially the part about pulling data for a term:
info about taxonmies => https://www.advancedcustomfields.com/resources/taxonomy/
help with debugging => https://www.advancedcustomfields.com/resources/debug/
search for other articles => https://www.advancedcustomfields.com/resources/
Sorry for not getting back earlier. Following is the way I set up acf on my Store taxonomy
Following is how I have implemented in Stores taxonomy php file
I am also copy-pasting the code here for your perusal
// load all ‘category’ terms for the post
$terms = get_the_terms($post->ID, ‘stores’);
// we will use the first term to load ACF data from
if( !empty($terms) )
$term = array_pop($terms);
$custom_field = get_field(‘description’, $term );
// do something with $custom_field
The code on “Store” taxonomy is as shown above. The output can be seen here: https://offcoupon.in/store/amazon-coupons/
Please check the bottom section of the above page. Of course, it is working well for Amazon coupon store but it doesn’t work well on Foodpanda store) (https://offcoupon.in/store/foodpanda-coupons/ where it shows description of another store. This is just one incidence. It happens on almost all pages in “Category” taxonomy.
You must be logged in to reply to this topic.
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!
ACF gives Rareloop greater control over the WordPress admin experience. See how in our case study. https://t.co/IFafQupmrl— Advanced Custom Fields (@wp_acf) May 15, 2023
© 2023 Advanced Custom Fields.