Hide Featured image on post for specific catgory

Posted in: Newspaper
Post count: 14

Is there a way to customize the Featured Image to be hidden for specific categories? Like editing from Customize the categories section

Example
I want to HIDE the featured image for ALL post inside Category NNNNN.

Is there a way to do this?

Post count: 64

Hi,

you can add the following to the file /wp-content/themes/Newspaper/includes/modules/module_modifier/td_module_blog.php in line 200:


//do not show the featured image on post of these categories
if (in_category('SLUG-OF-CATEGORY')) {
return;
}

like this:
filter featured image by post category

-full reference: http://codex.wordpress.org/Function_Reference/in_category
-this does not hide thumbs in the blocks or categories listings, it hides the featd image when viewing the post itself
-this will be gone after a theme update, remember to keep tabs on things like that

hope this helps, cheers.

Post count: 7909

Hi,


@nf_prt
Thanks for your help!


@solokco
This solution works fine please check the module file and add the code with your category slug like @nf_prt suggested – http://screencast.com/t/iKNyIuXDCIzQ

Thanks!

Post count: 14

Is this still functional??

I see that on the new version there is no /includes/modules/module_modifier/td_module_blog.php file.

How can I do this with the new version?!

Thanks

Post count: 7909

Hi,

Try to add the code in td_module_single_base.php file – http://screencast.com/t/7m2t2Ydh

Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.