Title: more tag not working
Last modified: August 20, 2016

---

# more tag not working

 *  Resolved [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/not-working-38/)
 * I have the following in my template so that only the first part of the post displays
   i.e. the content before the more tag. But it doesn’t work and displays all of
   the conten.
 *     ```
       <?php query_posts('cat=1&showposts=1');?>
       <?php while (have_posts()) : the_post(); ?>
       <div>
       <?php the_content('Read more...'); ?>
       </div>
       <?php endwhile;?>
       ```
   
 * Whereas if I use this code it does work.
 *     ```
       <?php query_posts('cat=1&showposts=1');?>
       <?php while (have_posts()) : the_post(); ?>
       <div>
       <?php
       global $more;    // Declare global $more (before the loop).
       $more = 0;       // Set (inside the loop) to display content above the more tag.
       the_content("More...");
       ?>
       </div>
       <?php endwhile;?>
       ```
   
 * Just can’t figure out why the first one doesn’t work.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/not-working-38/#post-2240319)
 * [http://codex.wordpress.org/Customizing_the_Read_More#How_to_use_Read_More_in_Pages](http://codex.wordpress.org/Customizing_the_Read_More#How_to_use_Read_More_in_Pages)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/not-working-38/#post-2240347)
 * Ah ha, thanks for the link

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘more tag not working’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [greencode](https://wordpress.org/support/users/greencode/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/not-working-38/#post-2240347)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
