Archived topic
Custom image won't display for category archive heros.
3 replies · Started by Megan on February 1, 2022
I have a site where I am creating custom heros before the category archives. I did this by creating a page hero block that has the location set to only the appropriate post category archives. However, I can't get the custom image to show - it just keeps showing the featured image of the latest post in the category. (see here: http://staging.lifehealthhq.com/category/whole30/compliant-brands/)
Hi Megan,
That's the default behavior if you set "Featured image" as the dynamic source for the container block's background on archive pages.
https://share.getcloudapp.com/X6u85R1J
If you need to show a specific image for each category term's archive page, you can create a custom field specifically for the terms using ACF or any custom field plugin so you'll have a image field on Dashboard > Posts > Category to be able to assign images.
You then fetch this field value on the Container block through a setting similar to this -
https://share.getcloudapp.com/qGurZOew
Thank you, this was helpful and I've managed to make the archive category images show up as intended!
Now I would like to have a line of custom text underneath each category name. So for example, for this category archive page (http://staging.lifehealthhq.com/category/whole30/can-i-have-it/) I would like to have a small line of text underneath the "Can I Have It" heading saying something like "Information you need to understand what's allowed and what's not".
How would I do that? I have ACF and created a "Description Text" field, but it seems like that text can only be generated with a hook element. However, I want that text to appear right under the heading, not in a separate container. Is that possible?
Hi there,
if you use the Description field in the Category Term, you can add a GP Dynamic Content Block, and choose Term Description.
if you want to use ACF the you would a GB Headline Block and set the Dynamic Data to Term Meta and in the field provided add your ACF Field name.