WordPress.org

Forums

Same text in all posts of category (2 posts)

  1. clockmancy
    Member
    Posted 2 years ago #

    I would like to know if there is a way to add the same text or banner under all posts of a specific category?
    i dont mean in the category page. i mean in each post's page

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    That should be possible by customising your theme's single.php template file - possibly via a child theme. You could use the in_category():

    <?php
    if ( in_category( 'wibble' )) :
    [banner markup goes here]
    endif;?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.