Summarising Posts in Wordpress

3 replies
  • WEB DESIGN
  • |
I have used the Page option in the reading panel for my posts.

This puts a nice page with all my posts on them.

Just wondering how do i make that page only show summarys and not full posts?

I think I have to set it in the post

but want help before I start.

thanks
#posts #summarising #wordpress
  • Profile picture of the author DigitalLinx
    To show the post summary than the whole post, go to the index.php or page.php and replace the current loop that starts with <?php if (have_posts.... with the following code -

    <?php if (have_posts()) :
    while (have_posts()) : the_post();
    = get_post_custom_values("full");
    if (isset()) {
    //Custom field is set, display a full post
    the_title();
    the_content();
    } else {
    // No custom field set, let's display an excerpt
    the_title();
    the_excerpt();
    endwhile;
    endif;
    ?>
    Let me know if that was what you wanted, or else something else, then ask in specific.
    {{ DiscussionBoard.errors[1455596].message }}
  • Profile picture of the author Aronya
    That code blows up my page:
    Parse error: syntax error, unexpected '=' in /home/XXXXX/public_html/mysite.com/wp-content/themes/HealthDesertNight/index.php on line 7
    {{ DiscussionBoard.errors[1456422].message }}
  • Profile picture of the author ladyqueen1988
    Banned
    You can use a plugin called "wp excerpt". This plugin is used to summarize your lenghty post into small paragraph.
    {{ DiscussionBoard.errors[1462632].message }}

Trending Topics