WordPress.org

Ready to get started?Download WordPress

Forums

condensing posts on the homepage (2 posts)

  1. mrjacksonismydad
    Member
    Posted 5 years ago #

    Does anybody know if it would be possible to have posts in a condensed or 'snippet' form on the home page. And then the user would click on the (read more) link to go to the full post? Is there code that I could employ or do I have to pick a completely different theme?

    Thanks for your time.

  2. stvwlf
    Member
    Posted 5 years ago #

    Hi

    See this page
    http://codex.wordpress.org/Template_Tags/the_excerpt

    In the template file used to display your homepage (in many themes index.php) you change the_content() to the(excerpt)

    For your homepage I would do it like this

    <?php if ( is_front_page() ) {
    	the_excerpt();
    } else {
    	the_content(... leave whatever is between parentheses the way it is... );
    } ?>

    Make a copy of the file before you change it, in case you make a mistake.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags