You won’t do much good just merging the arguments, you need to merge the resulting posts array and the post_count count. This works for me:
//setup your queries as you already do
$query1 = new WP_Query($args_for_query1);
$query2 = new WP_Query($args_for_query2);
//create new empty query and populate it with the other two
$wp_query = new WP_Query();
$wp_query->posts = array_merge( $query1->posts, $query2->posts );
//populate post_count count for the loop to work correctly
$wp_query->post_count = $query1->post_count + $query2->post_count;
Related Posts:
- Querying posts from multiple sites in a network?
- How do I query all posts of one type across my multisite installation?
- find a random blogid across my multisite network that has at least one post published
- BP Multi Network & Members Directory [closed]
- How do I Use Nested Loops of Custom Post Types for MultiSite Blogs using WP_Query()
- Switch to blog and get content from that blog
- How to show only blog-domain instead of the whole permalink in the loop
- Simplest way to query with blog_id?
- the_content not working on one of two Multisite sites
- Remove W3 Total Cache minified files on custom page outside of WordPress [closed]
- Fastest way to fetch posts across a multisite
- Multisite redirect loop for a single www domain
- In a loop, do not display content that does not have a thumbnail
- How to use WordPress Multisite With Different Domain Names?
- How To Add Custom Form Fields To The User Profile Page?
- How do I exclude a custom taxonomy from the post loop
- Can I force WP_Query to return no results?
- Where are available Roles Defined in the wp_ database?
- restore_current_blog() vs switch_to_blog()
- Resetting post data to previous loop in nested loops
- How to disable a network enabled plugin for just one site?
- Should we trust the post globals?
- How to reliably flush rewrite rules on multisite?
- Display all posts in a custom post type, grouped by a custom taxonomy
- Query multiple custom post types in single loop
- Some doubts about how the main query and the custom query works in this custom theme?
- Site Redirecting to wp-signup.php
- Moving a WP Multisite to a subdirectory
- Cookies in multisite where network sites have their own domain name
- Convert a Multisite WordPress install into a Single site
- WordPress MultiSite Active Directory integration and site privacy
- WordPress Job Interview Preparation
- How to add Custom Blog Options to new blog setup form?
- How can I trust switch_to_blog()?
- Remove the blog slug from WordPress Multisite root node
- Why are my roles not visible in a Multi-site/Network?
- Site admin in a network install can’t edit users?
- How to use same email for multiple users
- How to run an activation function when plugin is network activated on multisite?
- Specific upload folder for PDFs in custom Post type in WP multisite
- Get post count of current loop when using multiple queries on one page
- What is the correct way to map multiple domains in a WordPress 4.1 multisite install?
- Where can I find documentation on what characters are allowed in user names and why?
- How to migrate subsite from dev multisite to production multisite
- How can I un-reserve a pending username registration?
- How do I remove/delete an old super admin user?
- Multiple WP_Query loops with Pagination
- DB connection error after copying a WordPress Multisite instance to a second location
- Redirect Main Site to Subsite in Multisite WordPress
- Using a custom WP_Query with get_template_part loop
- Is there a is_user_logged_in() for multisite?
- Switching MultiSite installation from HTTP to HTTPS
- Allow user to select a theme to install when they signup
- Setting up a wordpress network with third level domains
- Get upload URL by blog ID in multisite
- What’s the difference between get_site_option and get_blog_option?
- How do you get the count of posts in an archive page?
- Need help sorting “My Sites” Alphabetically
- How to delete post revisions?
- Create mobile site with same content just different theme
- Add additional Network constants to wp-config.php dynamically
- Multisite stuck at 1MB for max file size
- How to get blog name, when using WordPress Multisite
- What are options are there to implement a multi language site
- Switching primary site in WordPress Multisite
- Multisite Network Port Num Issues?
- Convert existing site to network
- Where is the robots.txt stored for a WordPress Multisite install?
- Settings API in Multisite – Missing update message
- Add WordPress MU Network Admin via Database
- How to get current site id? (WPMU)
- Multisite on Windows with wildcard subdomains
- Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?
- Which asset URLs are acceptable in a “vanilla” MU install?
- WP_Query vs get_posts
- $wpdb->base_prefix not get parent site prefix in multisite
- How to tell which database tables belongs to which multisite site
- what are pmxi tables? [closed]
- Using wp_insert_post() with Networking enabled
- Are nested subdomains possible with a subdomain multisite?
- Sharing Dynamic Sidebars across Multisite Blogs
- I want to develop locally with Multisite, then migrate each site to separate remote WP installs
- Password Reset for Users on a Multisite Subsite
- Anyone figured out how to use WordPress MultiSite with Domain Mapping & SSL?
- Can a multisite’s blogs be accessible from two different sub-domains?
- WPML with WP_Query serving up all 3 languages [closed]
- Plugin for editing options on multisite?
- What do I need to do to convert my MultiSite from HTTP to HTTPS?
- is_front_page() malfunction?
- Loop within a loop?
- WP_Query and next_posts_link
- WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
- Show posts without term
- How to share WordPress core library
- How do I change the Multisite URL?
- Create site programmatically for WPMU
- Can upload doc and pdf but not ppt – not permitted for security reasons
- How Can I Centralize Content Usage and Approval in a WordPress Multi-Site installation
- Usage of the new “posts_clauses” filter in WordPress 3.1?
- WordPress Multisite: Adding actions to only one site