Forums

two problems with more quicktag (4 posts)

  1. tommyill
    Member
    Posted 5 years ago #

    This is driving me nuts so any help would be greatly appreciated.
    This is what I am trying to do (on one page):
    Display an excerpt of the "about" page with a more link to the page, then display excerpts for the most recent 3 posts (excluding one category) with more links to the full posts. All of the posts and the about page have the more quicktag (<!--more--> to mark where I want them separated.
    The problems:
    1. No matter what I try I can't display an excerpt for the about page except if I use the_excerpt() in which case all the html is stripped (unacceptable).
    2. If I include the 2 loops, one to get the about excerpt and one to get the recent posts (see below) the more links for the recent posts don't appear. The more links for the recent post do appear when the about loop is not included.

    Here is the code that I have so far:

    <div id="daily_op">
    <h2 id="daily_op_head" class="text_replace">a daily operation</h2>
    <?php query_posts("page_id=2"); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php the_content('more'); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    <?php endif; ?>
    </div> <!-- end #daily_op -->
    <div id="features">
    <h3 id="features_head" class="text_replace">latest features</h3>
    <?php query_posts("cat=-5&showposts=3"); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="feature" id="feat<?php the_ID(); ?>">
    <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h4>
    <div class="entry"><?php the_content('more'); ?></div>
    </div><!-- end .feature-->
    <?php endwhile; ?>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    <?php endif; ?>
    </div><!-- end #features-->

  2. Evita
    Member
    Posted 5 years ago #

    See this post:
    http://wordpress.org/support/topic/49782?replies=5

    Maybe, it will help you.

  3. tommyill
    Member
    Posted 5 years ago #

    I think that may solve problem number one, but not number 2, and also I don't think I am ready to write a plug-in for this. Perhaps I could pull directly from database instead of using the_post, etc.?

  4. tommyill
    Member
    Posted 5 years ago #

    If anyone runs into this problem in the future, this plugin did the trick for me:
    the_excerpt_reloaded

Topic Closed

This topic has been closed to new replies.

About this Topic