• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

featured image display ONLY on select catagories

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › featured image display ONLY on select catagories

This topic is: not resolved
  • This topic has 1 reply, 2 voices, and was last updated 11 years, 8 months ago by Wordpress.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 27, 2014 at 12:55 pm #92703
    kmmackey
    Member

    Hello,

    I have a several blog type pages on a site that I am building. I would like the "featured image" to appear ONLY on one category.

    I read this - http://wpsmith.net/2012/genesis/how-to-hide-the-featured-image-of-a-specific-category-on-the-blog-page-in-genesis/ -

    I have only one category that needs the image to appear and the example above refers to hiding only one category. I do not know how to modify that code to hide more than one category. Can someone tell me how to do that or if there is a better way to do it.

    Thanks,
    Kathy

    http://www.kathymackeywebservices.com/PGSPN/
    February 27, 2014 at 1:51 pm #92715
    Wordpress
    Member

    Go to Genesis > Theme Settings > Content Archives > deselect "Include the Featured Image?"

    Add this to your functions.php file:

    add_action( 'genesis_before_entry_content', 'child_category_thumbnail' );
    function child_category_thumbnail() {
    	if ( in_category( 'yourcategory' ) ) {
    		the_post_thumbnail();
    	}
    }

    yourcategory is your category. If you want to add more categories, then add more categories in an array separated by a comma (e.g., if ( in_category( array( 'category1', 'category2', 'category3' ) ) ) { )

    A nicer alternative (more similar to Genesis) - this links the featured image to the post, but no featured image when in single view:

    add_action( 'genesis_before_entry_content', 'child_category_thumbnail' );
    function child_category_thumbnail() {
    	if ( in_category( 'yourcategory' ) && ! is_singular() ) {
    		echo '<a href="' . get_permalink() . '">' . get_the_post_thumbnail() . '</a>';
    	}
    }
  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble