Title: 2.1.3 Recent Posts code broken
Last modified: August 18, 2016

---

# 2.1.3 Recent Posts code broken

 *  [WordyPresser](https://wordpress.org/support/users/jeremyduffy/)
 * (@jeremyduffy)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/)
 * [http://wiki.wordpress.org/?pagename=Recent%20Posts](http://wiki.wordpress.org/?pagename=Recent%20Posts)
 * I’m using the code from the link above (Nick Momrik’s code) and it depends on
   pages not having a “publish” attribute which they now do. I’m not on my development
   machine so I can’t see the tables’ layout.
 * Can someone tell me any column I can test for that will return only posts and
   not pages?

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

 *  [Glenn Ansley](https://wordpress.org/support/users/blepoxp/)
 * (@blepoxp)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/#post-548528)
 * You probably need to add an AND to the WHERE in your plugin’s query if the author
   hasn’t already fixed it.
 * [See here](http://wordpress.org/support/topic/102880?replies=5) for what I’m 
   talking about (although it’s a different plugin).
 *  Thread Starter [WordyPresser](https://wordpress.org/support/users/jeremyduffy/)
 * (@jeremyduffy)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/#post-548533)
 * I don’t think that’s it. I need to know what column to test to see if the post
   is a page or not. Publish status and date aren’t going to help since both posts
   and pages have that.
 *  [Glenn Ansley](https://wordpress.org/support/users/blepoxp/)
 * (@blepoxp)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/#post-548534)
 * I was referring to the post_type=post
 *  Thread Starter [WordyPresser](https://wordpress.org/support/users/jeremyduffy/)
 * (@jeremyduffy)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/#post-548535)
 * Doh. I didn’t read it carefully enough. You’re completely right and it’s working
   now. Thanks!
 *  [rudolf45](https://wordpress.org/support/users/rudolf45/)
 * (@rudolf45)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/#post-548536)
 * What you need to know is this (quote from the main page):
    **This wiki is deprecated.
   Please use the [Codex!](http://codex.wordpress.org/Main_Page)**
 *  Thread Starter [WordyPresser](https://wordpress.org/support/users/jeremyduffy/)
 * (@jeremyduffy)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/#post-548537)
 * rudolf: thanks! I found this page particularly helpful and probably won’t need
   to post another question like this.
 * [http://codex.wordpress.org/Database_Description](http://codex.wordpress.org/Database_Description)

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

The topic ‘2.1.3 Recent Posts code broken’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 6 replies
 * 3 participants
 * Last reply from: [WordyPresser](https://wordpress.org/support/users/jeremyduffy/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/213-recent-posts-code-broken/#post-548537)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
