WordPress.org

Ready to get started?Download WordPress

Forums

Front page doesn't display summary of posts (only full text)! (7 posts)

  1. dinna
    Member
    Posted 5 years ago #

    Hi there,

    I want to display just the summary of the latest posts on front page but it displays the full text! Despite of the fact that I have changed the reading settings-> For each article in a feed, show -> from full text to summary!!!
    (My website is not ready just yet: http://www.trendymums.co.uk)
    Couldn't find any solution anywhere!

    HELP!!! PLEASE!

    Many thanks!!!

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Try using the <!--more--> tag in your posts at the point where you want the post's content to stop displaying on the front page. The settings you refer to are for the RSS feed only - not the posts display.

  3. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    replace
    <?php the_content(); ?>
    with
    <?php the_excerpt(); ?>
    in either your theme's home.php (if you have one) or your index.php

  4. dinna
    Member
    Posted 5 years ago #

    You are both great!!!!
    Both solution worked!

    MANY THANKS GUYS!!!!!!!!!!

  5. johnywhy
    Member
    Posted 4 years ago #

    what if my theme lacks a home.php? can i add one?

    i want to display summaries on archive pages, but full-text on the home page. currently, i get summaries on both.

    my theme has archivepage.php and archive.php

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    if you want full text on your home page, just change the_exerpt to the_content in index.php (unless you have some sort of custom template page as a home page....if your homepage shows all your newest posts, you are probably not using a custom template)

  7. johnywhy
    Member
    Posted 4 years ago #

    my index.php contains the_content, but i'm still getting just the excerpts.

    i tried adding the following inside the loop, which i found in the codex:

    global $more;    // Declare global $more (before the loop).
    $more = 1;       // Set (inside the loop) to display all content, including text below more.
    the_content();

    now i am getting the text content of the posts, but not the images in the posts.

    my goal is very simple: to display 1 sticky post on my homepage. i don't care whether the homepage is:

    • a Page, with a function or tag which displays 1 post (which should be the sticky automatically)
    • or, the standard blog homepage, set to show just 1 post (which should be the sticky automatically)
    • or, the standard blog set to show stickies only. I tried inserted this into the loop:
      <?php query_posts(array('post__in'=>get_option('sticky_posts'))); ?>
      which actually works great, but still no images.
    • or, a Page, with a function or tag which explicitly displays 1 sticky

Topic Closed

This topic has been closed to new replies.

About this Topic