Create Two Separate Queries (2 posts)

  1. likemindsdesigns
    Posted 3 years ago #

    I am trying to make a custom template to query posts posted in regular WordPress Category AND custom posts created by the Plugin "All In One Event Calendar".

    I have created a template page that will call either query. Is it possible to call both at the same time? This is what I have so far:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args = array(
      'cat' => 20,
      'paged' => $paged
    $cals = array(
      'post_type'=> 'ai1ec_event',
      'paged' => $paged
    $myquery = array_merge($args,$cals);

    I want $myquery to show all the posts in BOTH $args and $cals at the same time.

  2. likemindsdesigns
    Posted 3 years ago #

    To try an clarify, here is a link showing all my custom posts $cals


    Here is a link showing all my regular $args WP posts for category 20 :


    I want both these types of posts to live on the same page, but I am lost how to do it. I have tried

    $myquery = $cals or $args;
    $myquery = $cals and $args;

    but neither of those work.

Topic Closed

This topic has been closed to new replies.

About this Topic