Hi, I have created a header for category pages using the hooks add_filter('cs_match_header_assignment', 'custom_search_header')
but i want to display a field from acf, example i have create a Category Image with field key “cat_image” then i tried to use the ARCHIVE META and insert the key but it’s not working. Please advice. Thanks
Hello Edward,
Thanks for posting in!
Please edit your custom header for the category pages and then insert an image element. For the image source, insert a dynamic content {{dc:archive:meta key="cat_image"}}
.
Hope this helps.
Hi Edward,
Thank you for the screenshots. At this point, please share site URL and credentials inside a secure note so we can double check your setup. Thank you.
Hi, I have sent the login credential and hope to figure out the issue. Thanks
Hey Edward,
It’s good to know that you have resolved your issue already. I have checked it and the resulting dynamic content code is: {{dc:acf:field field="sign"}}
.
If you need anything else we can help you with, don’t hesitate to open another thread.
Hi Rue, I noticed the dynamic field is not working on other category page like https://ysyncx.com/category/building-block-elements/principles-and-heuristics/leverage/ and https://ysyncx.com/category/building-block-elements/ i’m trying to figure out but still have no success why it’s not showing on other categories. Thanks
Hi Edward,
Please make sure you assign the same header on those Categories, and please re set (remove & add) those images from the category. And clear any caching features the site might have.
Thanks,
Hi, All categories are the same headers as i am using the hooks below:
add_filter('cs_match_header_assignment', 'custom_search_header');
function custom_search_header( $match ) {
if ( is_category() ) {
$match = 1655; // the post ID for your header
}
return $match;
}
and also i have already tried to reset the header field many times but still not working.
Hi Edward,
We did some more testing and I can confirm the issue on our dynamic content. It should return image URL. Upon testing it is returning image ID thus it is not working. I have posted this on issue tracker for now. We’re sorry for the inconvenience this has cause you. Thank you for understanding:
Hi, Thanks and i hope this will fix in the next update.
Thank you for your understanding.
Stay tuned!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
Hi @dusedward,
I know it’s been quite some time but I wanted to followup on this thread and let you know that what you’re looking to do here isn’t actually possible with ACF and Dynamic Content and will require some custom coding to fulfill. Our ACF integration applies only to data coming from the current post - not the current term (e.g. category) This is why you’re not getting anything pulled through.