I want to show all the content for posts on a page that isn’t a single-page. The page for the_content says to do this:
<?php global $more; // Declare global $more (before the loop). $more = 1; // Set (inside the loop) to display all content, including text below more. the_content(); ?>
So I wrote this:
<?php global $more; $more = 1; //declare and set $more before The Loop ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $more = 1; the_content(); ?> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
Unfortunately it’s still only showing the first two paragraphs. (Oddly it always breaks after the second paragraph, NOT after a certain number of words. Maybe this is a clue?)
Here is an example page: http://jaxworx.litsam.com/category/ch2/
It is displaying the first two paragraphs of two posts. There are more paragraphs not displaying. (There are only two posts though.)
- The topic ‘the_content() with $more=1 not working’ is closed to new replies.