The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Advanced Custom Fields
the_field for category pages (1 post)

  1. pb_advancis
    Posted 3 years ago #

    Hi there,

    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 :-)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic