Different size of featured image for single category/tag archive

Community Forums Forums Design Tips and Tricks Different size of featured image for single category/tag archive

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  SoZo 1 year, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8908

    wpspeak
    Participant
    Post count: 112

    Hi folks.

    How do I use different size of featured image for single category/tag?

    1. I need to register a new custom image size in functions.php. (Ex: 250×250)

    2. Create a custom file. For food category, I need to create category-food.php file.

    So what’s next?


    #17143

    SoZo
    Moderator
    Post count: 1573

    You don’t need a category template. You can add a function to functions.php with a conditional to control the output. You’d need to include the remove_action to get rid of the image and then add in another image size in it’s place. This should help.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.