• cpryce

    (@cpryce)


    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>
    <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; ?>
    </td>

    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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Problem with the_content()’ is closed to new replies.