Support » Plugins » Post icon according to category

  • diasje

    (@diasje)


    Hello, i have a Vlog website, that have normal Text posts.
    In the front page, i have an excerpt of every post.
    I would like to know if it is possible to have a icon (png image) indicator of wat kind of post it is.

    Like:

    <?php if ( is_category(‘4’) ): ?>
    <img src=”http://mywebsite.com/images/vid.png” alt=”Video Post” />
    <?php if ( is_category(‘5’) ): ?>
    <img src=”http://mywebsite.com/images/text.png” alt=”Text Post” />
    <?php else: ?>
    <?php endif; ?>

    I have tested this but only get T_endwhile error.

  • The topic ‘Post icon according to category’ is closed to new replies.