WordPress.org

Ready to get started?Download WordPress

Forums

How to exclude certain lines from home page (2 posts)

  1. jrwall68
    Member
    Posted 3 years ago #

    I'd like to add a descriptive <h2> tag to my post page as a better 'headline' for the post than the title.

    Is there code to use to exclude this line, which I'll code as <h2> from appearing on my front page? I only want the posts title on the frontpage, but I want the 'subtitle' to appear at the top of the post itself.

    Thanks.

  2. jrwall68
    Member
    Posted 3 years ago #

    Like so many things...I figured this out on my own. Rather than use the "more" option and selecting part of my post to display on the front page, I turned on the "excerpt" option and copy and pasted that section.

    I replaced:

    <?php the_content(); ?>

    with

    <?php the_excerpt(); ?>

    In the loop.php file.

Topic Closed

This topic has been closed to new replies.

About this Topic