Title: wp2.5 breaks query_posts usage
Last modified: August 19, 2016

---

# wp2.5 breaks query_posts usage

 *  [shua](https://wordpress.org/support/users/shua/)
 * (@shua)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/wp25-breaks-query_posts-usage/)
 * I have pages that have a bit of descriptive content on them – I then list some
   articles that relate to the page. I did it this way so I could easily control
   the navigation.
 * I have found that upgrading to 2.5.1 has broken my pages. Please take a quick
   look at the example below:
 * This page works in 2.0.5…
    [http://www.seesawnetworks.com/affiliates/articles/](http://www.seesawnetworks.com/affiliates/articles/)
 * here is my code snippit
 *     ```
       <?php if (have_posts()) : ?>
       	<?php while (have_posts()) : the_post(); ?>
       		<div id="featureMsgLanding">
       			<h1><?php echo c2c_get_custom('landingHead'); ?></h1>
       		</div>
       	<?php endwhile; ?>
       <?php endif; ?>
   
       <!--- Begin Loop News Category --->
       <div style="margin-left:10px;width:530px;clear:both;">
       	<?php query_posts('category_name="Article Affiliate"&showposts=10');
       		while (have_posts()) : the_post();
       		$do_not_duplicate = $post->ID; ?>
       			<table border="0" width="540" cellspacing="0" cellpadding="0" id="newsPRevents">
       				<tr valign="top">
       					<td><img src="<?php echo get_template_directory_uri() . '/images/avatars/avatarArticles50x50.gif' ?>" width="50" height="50" alt="<?php the_title(); ?>" border="0"/></td>
       					<td valign="top">
       						<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
       						<?php the_excerpt(); ?>
                                               </td>
       				</tr>
       			</table>
       			<p />
       		<?php endwhile; ?>
       	</div>
       <!--- End Loop News Category --->
       ```
   
 * Now the page renders without the query_posts(‘category_name=”Article Affiliate”&
   showposts=10’); …?> kicking off.
 * thoughts?

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

 *  [Evita](https://wordpress.org/support/users/evita/)
 * (@evita)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/wp25-breaks-query_posts-usage/#post-761068)
 * Try
    ‘<?php query_posts(‘category_name=Article Affiliate&showposts=10′);’
 *  Thread Starter [shua](https://wordpress.org/support/users/shua/)
 * (@shua)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/wp25-breaks-query_posts-usage/#post-761211)
 * ha! that was the first thing I tried – wp doesn’t seem to like spaces – still
   didnt work.
 *  Thread Starter [shua](https://wordpress.org/support/users/shua/)
 * (@shua)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/wp25-breaks-query_posts-usage/#post-761257)
 * the fix I found (which kinda sucks) is to use cat=ID rather than category_name
   =Name

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

The topic ‘wp2.5 breaks query_posts usage’ is closed to new replies.

## Tags

 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 2 participants
 * Last reply from: [shua](https://wordpress.org/support/users/shua/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/wp25-breaks-query_posts-usage/#post-761257)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
