Support

Account

Home Forums General Issues How to add custom field to a category? Reply To: How to add custom field to a category?

  • Hi

    i have tried to show an image and text block on woocommerce category page . I have tried almost every example .

    $queried_object = get_queried_object();
    $taxonomy = $queried_object->taxonomy;
    $term_id = $queried_object->term_id;

    $grade = get_field(‘grade’, $queried_object);
    $grade = get_field(‘grade’, $taxonomy . ‘_’ . $term_id);

    this code will showing me only the following output

    6395, , category-ballons, , , image/png, https://i2.wp.com/kxxxxxx.com/demo/wp-content/uploads/2016/09/category-ballons.png?fit=1920%2C400, 1920, 400, Array

    any of the solution didn’t works for me .