Support » Fixing WordPress » How to include an excerpt text in an index Post or Page

  • I have installed the Page Excerpt plugin since I am based on Pages rather than Posts. (Whether that was a good idea three years back I don’t know?)

    1. I can see the excerpt appears as a search result. But how do I include the excerpt text in an index Post or Page page?
    2. If not possible, is there a plugin?

    Aside, for functions.php in twentytwelve-child:

    1. At first I tried this: but WordPress complained
    2. Then I tried to add the reference to the post/(page?) excerpt in the excerpt isetlf, but WordPress complained
    3. That’s when I installed the Page Excerpt even if it hasn’t been updated. But then I guess that functionality is rather stable?
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi. I think you’d want to edit your theme’s page.php file (ideallly a child theme) to add the_excerpt() wherever you want the excerpt to appear in the template.

    Thanks. Clifford! However..

    I took a copy of page.php and moved it to twentytwelve-child.

    I inserted
    <?php the_excerpt(); ?> in the while loop before or after
    <?php get_template_part( ‘content’, ‘page’ ); ?>

    This went in the feet of the “Table of Contents Plus” plugin that had the unformatted TOC words added.

    However, this is not what I wanted, so I just renamed page.php to page_.php (ftp) to get it out of the way.

    I would like to have a single Page that would list the excerpts of all the other pages with the oldest at the bottom and newest on the top (or something like that).

    If I do it by hand, how do I get some other page’s excerpt into a paragraph of such an excerpts page? If I set up that page by hand, I’d like the excerpts to be automatically updated when I update them. Isn’t this like “everybody” has?

    Maybe there is a plugin that does all this for me? I have the “Page Excerpt” plugin active at the moment, but I can’t see it do anything. I did try to add the needed lines (see above) but there must be something basic I miss.

    This page: has the Excerpt window filled with some text that’s presently not seen anywhere.

    The plugin you’re using might just be ENABLING excerpts for pages.

    What you’re wanting is… once excerpts are ENABLED on your Pages, you want to DISPLAY the excerpt.

    It sounds like you’re wanting a custom query or loop.

    You might like the Page-List plugin. For example:
    [pagelist_ext] – list of pages with featured image and with excerpt” is an excellent plugin too.

    I hope this info helps you pull off what you’re wanting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to include an excerpt text in an index Post or Page’ is closed to new replies.