- This topic has 21 replies, 8 voices, and was last updated 2 years, 10 months ago by
Fernando.
-
AuthorPosts
-
March 24, 2020 at 6:06 am #1208301
Ernst Wilhelm
How can achieve I it to display a category page together with a featured image in a simple way?
Cheers
March 24, 2020 at 7:37 am #1208382David
StaffCustomer SupportHi there,
Category pages don’t have featured images by default so:
1. Install this plugin:
https://wordpress.org/plugins/categories-images/
2. Create a New Hook Element.
https://docs.generatepress.com/article/hooks-element-overview/2.1 Add this to the Hook content:
<?php if (function_exists('z_taxonomy_image')) z_taxonomy_image(); ?>2.2 Select the Hook to position it e.g
after_archive_title2.3 Check Execute PHP
2.4 Set Display Rules to: Post Category ArchiveMarch 24, 2020 at 9:51 am #1208719Ernst Wilhelm
Hi. Config works fine, but callind a category page I can’t see the feature image, Example with a featured image at the backend
March 24, 2020 at 1:11 pm #1208891David
StaffCustomer SupportCan you add a simple line of HTML to the Hook e.g
<span>Hook is working</span>If that displays then we know the Hook config is correct.
March 24, 2020 at 1:11 pm #1208893David
StaffCustomer SupportCan you add a simple line of HTML to the Hook e.g
<span>Hook is working</span>If that displays then we know the Hook config is correct.
March 24, 2020 at 1:33 pm #1208919Ernst Wilhelm
Thanks. I found the error in config. I was a bit confused, because I could assign an image in the category config.
Thanks for your help.
March 24, 2020 at 1:46 pm #1208925David
StaffCustomer SupportGlad to hear that
July 13, 2020 at 4:17 am #1361758JOSE
Hi,
I’ve tried with dispatch theme and it’s not working.
May be it is necessary to make more changes with this theme?
Thanks
JoseJuly 13, 2020 at 4:25 am #1361766David
StaffCustomer SupportHi there,
Dispatch uses a Header Element for the archive pages.
You would need to either:1. Delete the Header Element in Appearance > Elements –> Archives Header
OR
2. In the above instructions change:
elect the Hook to position it e.g
after_archive_titletoafter_headerJuly 13, 2020 at 4:41 am #1361790JOSE
Now it’s working.
Thank´sJuly 13, 2020 at 4:49 am #1361797David
StaffCustomer SupportYou’re welcome
December 27, 2020 at 5:05 pm #1596106Jonathan
I found this plugin, hope it works.
February 21, 2021 at 11:27 pm #1667221Robino.Co
What would be the way forward if I want the hero background / the header element use this category featured image as a background?
February 22, 2021 at 2:11 am #1667381Elvin
StaffCustomer SupportHi Robino.Co,
It really depends on where the image is coming from.
Perhaps the answers here would help. Check these out:
https://generatepress.com/forums/topic/how-do-i-get-the-header-on-the-category-pages/
https://generatepress.com/forums/topic/advance-custom-field-image-for-my-category-archive-header-element-background/September 12, 2022 at 9:12 am #2340805Zarar
Hi – not to bring this whole thread back, but I’m having issues here. The category featured image is displayed correctly, but it’s not showing up in the <og:image> or any other meta tags, so posting it on social etc. doesn’t work.
Example: https://www.raptorsrepublic.com/category/canada-basketball/
Any ideas on how to resolve this?
-
AuthorPosts
- You must be logged in to reply to this topic.