Problem with the_content() (2 posts)

  1. cpryce
    Posted 7 years ago #

    In my page.php template, I want to show the post for the current page in one column and in a second column, I want to show several articles from a selected category. But I only want the part of the article before the more link.

    No matter what I try, the second loop always posts the full article

    <td class="left">
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <h1><?php the_title(); ?></h1>
        <?php the_content(); ?>
        <?php endwhile; else: ?>
        <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
       <?php endif; ?>
    <td class="right">
      <?php query_posts('category_name=home&showposts=5&order=ASC'); ?>
      <?php while (have_posts()) : the_post(); ?>
      <h3><?php the_title(); ?></h3>
      <?php the_content(__(" more...")); ?>
      <?php endwhile; ?>

    Again, the problem with the second loop is that I always get the full post. I want just the post up to the more link.

    And I have checked, each post in that category has a more link.

  2. cpryce
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic