WordPress.org

Support

Support » How-To and Troubleshooting » the_content () – Working on single posts?

the_content () – Working on single posts?

  • I have a home page with the following code:

    <code>

    <div id=”hp_story_1″>
    <?php get_a_post(38); ?>
    <!– Get post #38 (home_page_1 story –>
    <?php the_content(‘more… »’,FALSE); ?>
    </div>
    <!– End of hp_story_1 –>

    <div id=”hp_story_3″>
    <?php get_a_post(40); ?>
    <!– Get post #40 (home_page_3 story –>
    <?php the_content(‘more… »’,FALSE); ?>
    </div>

    <div id=”hp_story_2″>
    <?php get_a_post(39); ?>
    <!– Get post #39 (home_page_2 story –>
    <?php the_content(‘more… »’,FALSE); ?>
    </div>

    </code>

    The intention is to show an excerpt of a PAGE (not a post) on three seperate blocks on the home page.

    I have put the <!–more–> tag in the hp_story_2 page and the entire post is being shown.

    Am I using this tag correctly? I am unclear from the codex documentation what exactly…

    <blockquote>
    The <!–more–> quicktag will not operate and is ignored if there is only one post being displayed.”
    </blockquote>

    means. I also read that permalinks have something to do with this tag working.

    Any suggestions about how to get this working?

Viewing 4 replies - 1 through 4 (of 4 total)
  • It might be related to the fact that the “more” tag on Pages doesn’t work.

    Then any suggestions for a method of showing excerpts of a page similar to the way you can do it with a post?

    I have never tried… but what if you put the_excerpt tag in the plugin call (instead of the_content)?
    It’s worth a try 🙂

    I settled on a combination of the “Get A Post” plugin
    here at:

    http://guff.szub.net/2005/01/27/get-a-post/

    and the following code…

    <div id="hp_story_2">
    <?php get_a_post(39); ?> <!-- Get page ID #39 -->
    <?php the_content_rss('',0, '',30); ?>
    ">» » »...
    </div>

    Guess you can do anything in WordPress!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘the_content () – Working on single posts?’ is closed to new replies.