Title: orderby=modified
Last modified: August 19, 2016

---

# orderby=modified

 *  [Pete](https://wordpress.org/support/users/perthmetro/)
 * (@perthmetro)
 * [16 years, 12 months ago](https://wordpress.org/support/topic/orderbymodified/)
 * For the life of me I don’t know why but this hack isn’t excluding category 15
   from the list of posts that appear… any help greatly appreciated.
 * `<?php $d = 1; $query4 = new WP_Query();$query4->query('showposts='.$theme_options["
   fea3PostCount"].'&amp;exclude=15'.'&amp;cat='.$theme_options["fea3CatID"].'&amp;
   orderby=modified'); ?>`

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

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 12 months ago](https://wordpress.org/support/topic/orderbymodified/#post-1081988)
 * the syntax to exclude a category is `cat=-15` not `exclude=15`
 * in your case
    `'&amp;cat=-15,'.$theme_options["fea3CatID"].'&amp;`
 * be sure to use a single ampersand and not the ampersand+amp; that the forum software
   converts ampersands to
 *  Thread Starter [Pete](https://wordpress.org/support/users/perthmetro/)
 * (@perthmetro)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/orderbymodified/#post-1082175)
 * thankyou

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

The topic ‘orderby=modified’ is closed to new replies.

## Tags

 * [exclude](https://wordpress.org/support/topic-tag/exclude/)
 * [modified](https://wordpress.org/support/topic-tag/modified/)
 * [orderby](https://wordpress.org/support/topic-tag/orderby/)
 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * 2 replies
 * 2 participants
 * Last reply from: [Pete](https://wordpress.org/support/users/perthmetro/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/orderbymodified/#post-1082175)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
