• How can I make it so under ONE category post on the index page DOES NOT display the thumbnail at all?

    I realize I need an if then code, how would I go about creating that?

    Example on index page: If category post is MUSIC, then do not display thumbnail. If any other, display thumbnail on index page.

    THANK YOU!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php

    if(is_category(array(9,’blue-cheese’,’Stinky Cheeses’)) ):
    THEN ECHO THUMBNAIL
    endif;

    ?>

    or

    <?php

    if(is_category(array(9,10,20,23)) ):
    THEN ECHO THUMBNAIL
    endif;

    ?>

    USE category function as a condition ( is_category() or in_category()).

    Try this.

    Thanks
    Chinmoy

    Thread Starter tom_taylor_85

    (@tom_taylor_85)

    I wanted it to NOT display the thumbnail. So, in MUSIC thumbnai=false. But when I change true to false, it still shows the empty space where the thumbnail should be.

    My code is <td width="154"><a href="<?php the_permalink(); ?>"><img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" width="150" /></a></td>

    That displays the thumbnail. And yes, I can delete the thumbnail from the post, but the 154px is still taken up by a space of nothingness…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to not display Image Thumbnail for SOME categories on the home page?’ is closed to new replies.