• 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=”https://mywebsite.com/images/vid.png&#8221; alt=”Video Post” />
    <?php if ( is_category(‘5’) ): ?>
    <img src=”https://mywebsite.com/images/text.png&#8221; 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.