the_field for category pages
i´m using acf for several things. One of them is to show different header images for every page. This works fine. Since i gave categories to my pages, i´m using the category pages as an overview.
They display page icons, title and excerpt for each page inside the category. You might want to take a look: http://advancis.net/web/category/solutions/
So, because i don´t want the category page to show the header image of the first page inside it, i also added a field for that to the edit-category page.
When i now call
<?php the_field('page_header_image'); ?>"/>inside my category.php it doesn´t work. Using the same code inside my page.php works perfectly fine, but not here. I also tried to name the field differently, since i was afraid the value of the category could be in conflict with the value of the first page but i won´t work either.
I also tried to just add a text field called “test” to just read out a word before my category description, but even that doesn´t work.
It seems, that no matter which field i add to a category, i can´t read it out.
Would be very nice to get some help here, so i don´t have to create a static css workaround.
Thanks in advance 🙂
- The topic ‘the_field for category pages’ is closed to new replies.