• Resolved chanel

    (@chanel)


    I was wondering is there a special coding or a special plugin that will allow me to show the Full Text for the most recent post and then for the remainder that loads on the Main Page are just summaries?

    For Example:
    In my Reading settings in the “Blog pages show at most” I have 2. However, I want the recent post to be full text and the 2nd post be a summary.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter chanel

    (@chanel)

    thanks Michael. I always search Google and these forums first before I post but i never word it properly to get efficient results. I’ll try those soon and update this thread once i try it.

    @chanel

    Arrived here from your post in the other thread…looks like @michaelh has beat me to it ?? Good luck…that first link should work well for you.

    Thread Starter chanel

    (@chanel)

    hey figaro thanks!

    I’m trying to make sense of the provided link, but it looks a bit convoluted to me. Plus it’s only going to show the title of the other posts and not an actual summary with a “read more” link.

    …or am i reading it wrong?

    Thread Starter chanel

    (@chanel)

    Ok. I’m messing it all up, lol. I’ve tried putting the codes in the right places but I’m not getting it right.

    Here’s the index.php. Can someone show me where I need to put it?

    <?php get_header(); ?>
    <div id=”side-left”>
    <div id=”content”>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>
    <div class=”kutu”>
    <div class=”ust”><span></span></div>
    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <img src=”https://chanellie.com/diarylock.gif&#8221; align=”left”><h2>” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <font color=”#B890DC”><?php the_time(‘F d, Y’) ?> | <?php comments_popup_link(‘No Comment’, ‘1 Comment’, ‘% Comments’); ?></font>
    <div class=”tags”><?php the_tags(‘Tags: ‘, ‘, ‘, ”); ?></div>

    <div class=”entry” align=”justify”>

    <?php the_content(‘ ‘); ?>

    </div>
    <br class=”clear” />
    <div class=”postmetadata”>Click ” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>” class=”more”>here to ” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>” class=”more”>read more of this post…</div>
    </div>

    <div class=”alt”><span></span></div></div>
    <?php endwhile; ?>

    <div id=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘Older Entries‘) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Newer Entries‘) ?></div>
    </div>

    <?php else : ?>

    <div class=”kutu”>
    <div class=”ust”><span></span></div>
    <h2 class=”center”>Not Found</h2>
    <p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
    <?php include (TEMPLATEPATH . “/searchform.php”); ?>
    <div class=”alt”><span></span></div></div>

    <?php endif; ?>

    </div>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Change

    <?php if (have_posts()) : ?>

    to

    <?php if (have_posts()) : ?>
    <?php $count = 0; ?>

    change

    <?php the_content(' '); ?>

    to

    <?php $count++; ?>
    <?php if ($count < 2) : ?>
    <?php the_content() ?>
    <?php else : ?>
    <?php the_excerpt(); ?>
    <?php endif; ?>

    more or less …. ??

    Thread Starter chanel

    (@chanel)

    yayyy, that did it. Lovely Michael!

    One more thing, how can I change the 55 word limit? I’d like a littttttttle bit more showing. lol

    Thread Starter chanel

    (@chanel)

    nevermind. i found where i can change it. it’s located in wp-includes/formatting.php, somewhere after line 779 is this

    /**
    * Generates an excerpt from the content, if needed.
    *
    * The excerpt word amount will be 55 words and if the amount is greater than
    * that, then the string ‘[…]’ will be appended to the excerpt. If the string
    * is less than 55 words, then the content will be returned as is.
    *
    * @since 1.5.0
    *
    * @param string $text The exerpt. If set to empty an excerpt is generated.
    * @return string The excerpt.
    */
    function wp_trim_excerpt($text) {
    if ( ” == $text ) {
    $text = get_the_content(”);

    $text = strip_shortcodes( $text );

    $text = apply_filters(‘the_content’, $text);
    $text = str_replace(‘]]>’, ‘]]>’, $text);
    $text = strip_tags($text);
    $excerpt_length = apply_filters(‘excerpt_length’, 55);
    $words = explode(‘ ‘, $text, $excerpt_length + 1);
    if (count($words) > $excerpt_length) {
    array_pop($words);
    array_push($words, ‘[…]’);
    $text = implode(‘ ‘, $words);

    I changed 55 to 150. ?? !!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Summary For 2nd Post’ is closed to new replies.