WordPress.org

Ready to get started?Download WordPress

Forums

Page showing recent posts as excerpts.. (5 posts)

  1. swinhoe
    Member
    Posted 1 year ago #

    I know this is a simple function, but for some reason the standard WP setting is no longer working.

    In the 'Reading' settings, i can choose how many posts and where to show the whole post or the excerpt. This appears to be broken, and so, what im looking for is the code to slip into a template to get it to show the 10 most recent posts as excerpts...

    I should be able to re-cylce the Archive code form the parent 2011 theme im using;

    <?php
    /* Run the loop to output the page.
     * If you want to overload this in a child theme then include a file
     * called loop-page.php and that will be used instead.
     */
    get_template_part( 'loop', 'page' );
    			?>

    But thats not working... any pointers ?

  2. swinhoe
    Member
    Posted 1 year ago #

    do i need to pass the page some vars to get it to print ?

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    In the 'Reading' settings, i can choose how many posts and where to show the whole post or the excerpt.

    No - the latter section refers to your RSS feed - not the display of Posts on your site.

    I should be able to re-cylce the Archive code form the parent 2011 theme

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.

  4. swinhoe
    Member
    Posted 1 year ago #

    ah, that makes more sense...

    yes, im using a child theme, but how do i envoke the excerpts ?

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    The simplest solution would to omit get_template_part( 'loop', 'page' ); in your child theme's custom template file and replace it with a complete Loop that just uses the_excerpt() rather than the_content().

Topic Closed

This topic has been closed to new replies.

About this Topic