V
V
votetomick2021-06-12 20:13:38
WordPress
votetomick, 2021-06-12 20:13:38

Why doesn't get_field work everywhere?

get_field('
product_cats_category_img','product_cats_6')

Here is the code, it works on the category page, but does not work on the main page, it's not clear why. It looks like it should work everywhere.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Zolin, 2021-06-12
@artzolin

Because the id of the current category is defined on the category page, but not on the main one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question