Check this page out from the ACF docs: https://www.advancedcustomfields.com/resources/get-values-from-a-taxonomy-term/
Specifically this section:
“Finding the term related to the current post”
<?php
// load all 'category' terms for the post
$terms = get_the_terms( get_the_ID(), 'category');
// we will use the first term to load ACF data from
if( !empty($terms) ) {
$term = array_pop($terms);
$custom_field = get_field('header_image', $term );
// do something with $custom_field
}
?>
I changed their “category_image” to your “header_image” value. I think that should work for you.
Related Posts:
- get_field not displaying my custom field value
- Advanced Custom Fields: Using category as a rule, before publishing new post?
- advanced custom field Show field in special categry page [closed]
- Sorting posts by season
- How to loop only categories without posts (+ show category featured image with acf) [closed]
- ACF: Display category name using taxonomy field
- Assign category from custom field on post creation and update
- How to query categories with Advanced Custom Fields?
- How to display a value inside a post with a specified category from a category custom field? [closed]
- Query (built in) Categories and Advanced Custom Fields?
- ACF no print data [closed]
- How can i add service category here? [duplicate]
- How to set acf color field as background color to product category
- How can I add different custom fields for each category in the same post?
- How to create a category loop on my blog (ACF Plugin)
- In ACF, how to show custom category selection tab upon selecting a main category
- ACF plugin categories bug in WordPress 3.9
- My Query is getting the wrong data
- How to use acf field value to order category?
- How to link ACF relationship field to the new Query block in Full Site Editing
- Can I set a default featured image for a category?
- What’s the URL for a category archive?
- Weird behaviour when adding terms/term_taxonomies programmatically
- How can I get category ID by category name?
- how to use a different domain/subdomain for authors/catagories on single site?
- Category count inside the link
- Is there a way to have duplicate category slugs?
- Multiple level category drop-down
- how to show posts of category random by session
- Remove “Parent” Selection When Adding/Editing Categories?
- Show post only if match all categories
- Output link to category from WP_Query loop of woocommerce products
- How to get product count with respect to categories in WooComerce
- Password protect a specific category page/post
- If in category to be inside of a function
- Different excerpt styles per category, but chronological
- Show only one category
- Pagination Not Working on Category.php page
- Filter Home Page Posts in Buddypress [closed]
- Broken category pagination
- Additional featured post on first page
- Color different for the current category
- Displaying a full post instead of a slug per category?
- one category template for multiple categories
- How can I define a custom archive for childs of a specific category?
- How do I toggle pagination on/off in search results and category listings via a link?
- Category shows only top level child categories
- How can I get categories IDs if multiple categories requested via URI?
- List categories with custom code
- Page display certain Category Posts
- REST API: Display Category names in JSON?
- Conditional IF current cat is the smallest/last/end child cat THEN
- How to create a custom meta box field in category? [duplicate]
- How to create a subcategory to a PAGE on WP?
- How to show 1-5 of X Total Results
- Finding the category id’s on category intersection pages
- SQL query to return categories and category parents
- How to Remove a Title from All Category and Tags Page?
- Display sibling categories on category page
- Getting the category title / description returns first matching post?
- WordPress Show Parent Category Description for Sub-categories
- I want to know how to output child categories related to parent categories
- why get_the_post_thumbnail( the_ID()) echos extra post id
- Allow user to select categories that will display in post loop
- How to fetch the highest category in the hierachry for a specific post?
- Woocommerce search form with category select
- How to not display subcategories in Recent Posts widget area?
- Getting the Most Recent Posts from Multiple Categories
- Display category title and three latest post inside the category
- How to store category and tags separatly on wordpress?
- Is the part “category” fixed to an URL to an archive or post?
- How can I use AJAX with check-box categories?
- wp_delete_term or wp_delete_category?
- Get post content intro text on category.php?
- List Categories By Specified First Character
- the category city made as a subdomain
- Unable to browser posts in categories
- wp_get_post_categories not work currently on loop.php
- Inline If statement to echo CSS [closed]
- Get category base permalink
- WooCommerce showing active product categories on single product page
- how to exclude specific category types (uncategorized) from blog page?
- Confused about category.php template – not working
- Style a category page the same way as the homepage?
- Display Taxonomies in loop with template args
- Adding relevant categories to related post
- How to assign image on specified category and not show the image on other categories
- Top menu disapears in Category Pages when filtering using ACF
- How can I add a Categories page link to a menu? [closed]
- Display only the latest post
- Way to show content of a post, but if exceeds character limit revert to excerpt?
- get posts from 2 categories. (2 posts)
- How to add location as category?
- Converting Categories (with ACF fields) to custom taxonomies
- Why does my WordPress index has a category?
- How to get specific number of category post on a page or category page?
- Use same wordpress category base and tags as the prefix as the post permalink
- Display different sidebar based on search results from one category
- Adding category to existing post (uploaded file)
- how to create a page that shows all of multiple category posts on a single page