Site logo

[Resolved] category page & featured image

Home Forums Support [Resolved] category page & featured image

Home Forums Support category page & featured image

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #1208301
    Ernst Wilhelm

    How can achieve I it to display a category page together with a featured image in a simple way?

    Cheers

    #1208382
    David
    Staff
    Customer Support

    Hi 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_title

    2.3 Check Execute PHP
    2.4 Set Display Rules to: Post Category Archive

    #1208719
    Ernst 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

    #1208891
    David
    Staff
    Customer Support

    Can 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.

    #1208893
    David
    Staff
    Customer Support

    Can 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.

    #1208919
    Ernst 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.

    #1208925
    David
    Staff
    Customer Support

    Glad to hear that

    #1361758
    JOSE

    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
    Jose

    #1361766
    David
    Staff
    Customer Support

    Hi 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_title to after_header

    #1361790
    JOSE

    Now it’s working.
    Thank´s

    #1361797
    David
    Staff
    Customer Support

    You’re welcome

    #1596106
    Jonathan

    I found this plugin, hope it works.

    https://es.wordpress.org/plugins/wp-term-images/

    #1667221
    Robino.Co

    What would be the way forward if I want the hero background / the header element use this category featured image as a background?

    #1667381
    Elvin
    Staff
    Customer Support
    #2340805
    Zarar

    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?

Viewing 15 posts - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.