Forums

Summary, how-to please (8 posts)

  1. Lansluaght
    Member
    Posted 10 months ago #

    Hi, this has been bothering me for a while but i hadn't attached enough value to it untill now. With 2.7 up and running i'd figure it's now or never, even though it's probably stupidly simple:

    How do i get my front page to only show the first X ammount or words or lines from a post followed by a 'Read more...' button, and not the entire post itself? I figured it's not the excerpt thing (Though, not being a native english speaker, i don't really know what it is), but i can't figure out what does do what i want either. I see it everywhere, but can't figure out how to do it myself.

    Is this a plugin?

  2. MichaelH
    moderator
    Posted 10 months ago #

    You use the more Quicktag, <!--more-->, in your post to note the cutoff point. See Customizing_the_Read_More for more info.

  3. Lansluaght
    Member
    Posted 10 months ago #

    "If you have set your WordPress site to display post excerpts on the front or home page, ..." I fumble over the first line. Where do i enable that? looked through all the settings tabs, not in there :(

  4. MichaelH
    moderator
    Posted 10 months ago #

    Switch to the WordPress Default Theme.

    Write a post with this in the body of the post:

    This is an example of using the more which cuts off here <!--more--> and this is the rest of the posts.

    Save the post, visit your site.

    Also look at wp-content/themes/default/index.php for how the_content is structured.

  5. Lansluaght
    Member
    Posted 10 months ago #

    Sorry for my long strike of absence there, but i'll get right back into it.

    I'd tried simply inserting the <!--more--> quicktag into a post, but it didn't work, as with your example. I made a new post, copy+pasted that in the body, published it, and the entire thing just showed up on my front page. Still no cut-off or anything.
    And the only mention of the_content in my index.php file is :

    <div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>

    Which i can't make anything up out of.

  6. MichaelH
    moderator
    Posted 10 months ago #

    Try changing to the HTML editor and or with the Visual Editor use the "Insert More Tag" button.

    That code looks okay.

  7. Gangleri
    Member
    Posted 10 months ago #

    Alternately you can look for excerpt plugins. I use Excerpt Editor myself, it's quite flexible.

  8. washingtonautocredit
    Member
    Posted 6 months ago #

    I am trying to make my home page display the summary, and I have that selected in the wp-admin area, but no dice. I hope maybe you can tell me why. This is my code:

    <div id="content">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php global $more; $more = 0; ?>
    <div class="post" id="post-<?php the_ID(); ?>">

    <h2>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    <div class="entry">
    <?php the_content('Read More...'); ?>
    </div>

    <p class="postmetadata"><?php the_tags('Tags: ', ', ', '
    '); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

    </div>

Reply

You must log in to post.

About this Topic