Forums

How to add a heading to the posts? (3 posts)

  1. vieya
    Member
    Posted 7 months ago #

    Let's say I'm trying to do news or trying to give some sort of heading to my posts. Not each one but just like a Heading like in the pages so that you know what you are looking at it. For example.

    /News/

    [Posts go here]

    How would I do something like that? Would I edit the index.php? Or would that affect even the pages? I want to give my blog posts a heading of news so people know that's the news section they are.

  2. alchymyth
    The Sweeper
    Posted 7 months ago #

    is /News/ just an additional headline?

    details depend on your theme;
    you could add the line in index.php, possibly with a conditional statement to make sure it only shows on the posts page;

    for example, add something like this before the start of the loop:

    <?php if( is_home() ) echo '<h2>News</h2>'; ?>

  3. vieya
    Member
    Posted 7 months ago #

    yes it is just an additional headline since the posts section doesn't have a headline unlike the pages or perhaps that has to do with the theme like you said (I'm using Twenty Eleven)

Reply

You must log in to post.

About this Topic

Tags