the answer for all question about Oxygen Builder plugin and WordPress

Hey stars! So, I’m having a weird problem. I can’t seem to fetch any ACF’s that

Hey stars! So, I’m having a weird problem. I can’t seem to fetch any ACF’s that are nested in a product category? They are visible in oxygen dynamic tags, but return empty / null ? Check images. What am I missing? Thanx guys! ⭐️








Source

3 Comments
  1. Savien Van says

    Hi! I haven’t tried with pictures. But with text i had a similar problem. It was necessary to go to the page where the field is and save the value from there.

  2. Daniel Palmer says

    I have the exact same problem at the moment on a current site I’m working on and would love to know the solution here.

  3. Christian Schneider says

    Solution by the Oxygen support team:

    “” Unfortunately, it’s not possible to retrieve ACF fields from a taxonomy using Oxygen’s ACF integration. However, there is a workaround. Please install the Code Snippets plugin on your site and create a snippet with the following code:

    function my_get_acf_taxonomy_field($acf_field) {

    global $wp_query; // get the query object

    $cat_obj = $wp_query->get_queried_object();

    $data = get_field($acf_field, $cat_obj->taxonomy.’_’.$cat_obj->term_id);

    return $data;

    }

    You can then edit your template in Oxygen and retrieve the custom fields using Insert Data > PHP Function Return Value (right at the bottom). You need to enter the function name my_get_acf_taxonomy_field and in the arguments box, enter the name of the ACF field that you want to retrieve. “”

    Tried it, works great!

Leave A Reply

Your email address will not be published.

Oxyrealm Docs