Let’s say you’re working on a page template and it’s going to include a partial that’s going to display recent custom post types (or maybe even the standard post type) of the post type you’re viewing.
For example, say you’re looking at the example of stories or something like that. And you’re looking at a single page for a given author. Then, perhaps in the sidebar, it reads Read More From Other Authors, and it retrieves stories from up to five other authors.

Where additional custom post types may appear.
Writing a custom WP_Query, pulling back the five most recent posts, and dropping them into the selected area seems easy enough, right?
And it is. But there’s a gotcha.


