WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Having bits of the content from Pages appear on the front page (5 posts)

  1. buskerdog
    Member
    Posted 7 years ago #

    I'm using WP more for CMS than for blogging and I'd like to peg my front page with clips of a few of my Pages. I found the "MORE" divider for the Page content but I'm not sure what code to put on the front page so that it displays the segments of the Page content plus a (Read More) link to the Pages themselves.

    Thanks.

  2. moshu
    Member
    Posted 7 years ago #

    It will not, normally.
    Pages are not meant to be displayed more than ONE in one page.

  3. buskerdog
    Member
    Posted 7 years ago #

    Hmmm... I feel like there's gotta be a way with php or something to pull that text into the front page.

    If there really isn't, maybe I should fake it some other way.

  4. moshu
    Member
    Posted 7 years ago #

    I didn't say it's impossible - what I said is WP doesn't work like that. There is no ready-made (or simple) code to display excerpts or "before-more" portions of a WP Page. (The "more" tag doesn't even work on Pages...)

    If you have a home.php template in your theme - a lot of things can be coded into it, either manually or with plugins.
    To get ideas... :)
    http://codex.wordpress.org/Template_Tags/query_posts#Parameters
    http://guff.szub.net/2005/01/27/get-a-post/

  5. buskerdog
    Member
    Posted 7 years ago #

    This seems to work. I found it in one of the links you posted:

    <?php
    query_posts('pagename=Your Page Name');
    ...
    <?php the_excerpt(''); ?>
    yada yada

    so thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags