Support

Account

Home Forums Front-end Issues ACF Front End Display is Wierd

Solving

ACF Front End Display is Wierd

  • Hi,

    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

  • Hi @ricky709

    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/

    Phil

  • Hi,

    Sorry for not getting back earlier. Following is the way I set up acf on my Store taxonomy

    https://screenpresso.com/=hKDUc

    Following is how I have implemented in Stores taxonomy php file

    https://screenpresso.com/=K6Zwg

    I am also copy-pasting the code here for your perusal

    `<div><?php

    global $post;

    // 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 );
    echo $custom_field;
    // do something with $custom_field
    }

    ?></div> `

    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.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘ACF Front End Display is Wierd’ is closed to new replies.