WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my blog I'm displaying lists of posts from every category I have in the homepage. I have a column for each category. The code is this:

$categories = array('3', '4', '5');

foreach ($categories as $category):
        <div class="four columns">
            <h2 id="first_column" class="category_title"><?php echo  get_the_category_by_ID($category); ?></h2>
        <div class="post-list">
global $post;
$args = array('numberposts' => '3', 'category' => $category, 'post_status' => array('publish', 'future' ));
$myposts = get_posts($args);

Now I'd need to display also posts occurring in the future. They are called events, I guess. I know I cannot use the wordpress status flag of the posts, because it has another purpose.

I also tried the Event Manager plugin, but I can't find any way to mix these custom posts with the normal ones. Any suggestion?

share|improve this question
Have you created a custom post type? That isn't completely clear. – s_ha_dum Dec 12 '12 at 23:53
The Event Manager plugin creates a custom post type. I just have no clue how to display these posts mixed with the other ones. – Carlo Dec 13 '12 at 10:04

Add the post type parameter to your get_posts args.

$args = array(
  'numberposts' => '3', 
  'category' => $category, 
  'post_status' => array('publish', 'future' )
  'post_type' => array('post','slug-for-the-event-manager-post-type')

$myposts = get_posts($args);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.