global $switched;
switch_to_blog(2); //switched to your site id based on which site post need.
$administrators = get_users( array( 'role' => 'administrator' ) ); // you can add more role on same query add with "," separated.
$administrators_ids = array();
$original_blog_id = get_current_blog_id();
foreach( $administrators as $admin ):
$administrators_ids[] = $admin->ID;
$news = new WP_Query( array( 'author' => implode( ',', $administrators_ids ), 'post_type' => 'news', 'paged' => get_query_var('paged') ) );
endforeach;
if ( $news->have_posts() ) :
while ( $news->have_posts() ) : $news->the_post();
//add code here
endwhile;
endif;
wp_reset_postdata();
restore_current_blog();
Related Posts:
- Querying posts from multiple sites in a network?
- Copy posts from one blog to another in multisite environment
- How to query blogs posts of WordPress sub domain?
- WP MS: How to query over the network
- Get latest posts from multisite
- How to share WordPress core library
- Programmatically create blogs with dummy content on a WPMU site
- How to individually set WP_DEBUG on a sub-directory multisite?
- Change wordpress Multisite default site from side id 1 to side id 2
- How can I have network sites not use year/month folders by default?
- 4 single sites VS multisite wordpress
- multisite htaccess 301 redirects
- Why can’t a WordPress network (multisite) in it’s own folder use subdomains?
- Two-level multisites in WordPress
- using 1 form shortcode (si or cf7) for all multisite sites [closed]
- Display custom homepage text based on domain
- Add new domain to ‘My Sites’ using network admin
- Is there an advantage of using multisite if I have multiple WordPress websites for myself?
- WordPress Multisite Login Access
- Switch_to_blog() outside wordpress
- Jetpack Blog Subscriptions on Multisite [closed]
- current_user_can(‘Administrator’) does not return true in multisite if user is Administrator but NOT Super Admin
- cant enable theme in multisite
- Deleting a user in multisite
- Proper Network Activation problem has been fixed in wp 3.3.1 or not?
- On WordPress Network(multisite), Sub Blogs in Subdirectories or Subdomains? What’s better?
- Is there a way to separate a site inside a network (multisite) into its own wp site?
- How to know if a site is using Multisite?
- Why is ‘is_multisite’ returning true when it’s a single install?
- How can I delete a user from entire multisite nework
- Using A Shared/Common Theme Across Multiple Sites
- Forcing SSL Protocol for Multisite Subdomain Child Sites + cPanel Configuration
- Website DR using Multisite
- Multisite Network menu links not updating
- Activate Child Theme with Codex
- Can set_transient() be used in multi-site?
- WPML tables not deleted when removing multisite subsite, need help clearing up my sql-file! [closed]
- Why does my multisite blog doesn’t show users?
- What would you recommend for hosting 10+ individual wordpress websites?
- What sites are you registered to when joining a multisite?
- ERR_TOO_MANY_REDIRECTS IN MULTISITE NETWORK DASHBOARD
- WordPress Multisite new sites in directory
- add_rewrite_rule on multisite doesn’t work
- web.config breaks the themes for sub-directory multisite
- How to configure Multisite Network with randomized hostnames?
- wp_insert_site() is triggering database error in a unit test
- Multisite: How to get a list of installed languages
- “You must be logged in to comment” but I am already logged in
- Multisite User Sync Question about blog authorship
- Is the Multi site functionality a viable option for Country and Language targeting?
- WordPress multisite .htaccess causes 500 error on old *.php URLs
- WP-CLI cron on multisite using WP-Toolkit “succeded”, but callback not executed
- WordPress multisite suddenly malfunctioning
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- Cannot use pre_set_site_transient_update_themes from within a theme in multisite
- Login problems on multisite installation with different domains
- Multisite, with virtual root
- Domain Mapping for WordPress MU and https redirection – How to?
- Move wp-content htacess
- FeedWordPress duplicated posts problem
- WordPress MU subdomain vhost
- Domain mapping with Multisite links are wrong
- Install multisite wordpress on a subdomain and map to top level domains
- How do I stop exactly one blog from network ever setting cookies?
- How to use different domains subdomains in WP multisite? [duplicate]
- Combining user database tables while keeping all other data in seperate for multiple sites?
- Two Websites with the same administration Panel In WordPress
- Creating a multilingual multisite
- Automatically Insert Into Post when uploading Media
- Hiding media uploaded by other users in wordpress multisite?
- Multitenant with a single site
- Multisite Create New Blog Plugin
- Configure WordPress Multisite Pages with Custom Permalinks
- WPMU function get_blog_details, last_updated/registered and formatting time and date string
- Multisite WordPress on a site that is more than 30 days old
- How to fix redirection of Post/Page of wordpress inside the wordpress?
- Multi Site Language switcher
- Displaying Multisite ID number
- User not staying logged into one of sub sites in multisite after SSL
- WordPress Multisite Network Subdomain
- register_setting() for single site vs update_site_option() for mu
- Allow users to register on multisite through WooCommerce using the same email address
- Use a single WP installation instead of three
- MU domain mapping without using a plugin
- Sending SMTP mail using a server with self-signed SSL
- Can WordPress Multisite work like a regular site?
- Multisite authorization error 401
- How create a multisite setup with “phantom” accounts and passwords?
- is there a if multisite have posts function?
- Multisite – mix sites that use subdomains with sites that use paths
- WordPress Multisite — Have same navigation, sidebar and footer across all sites.
- Primary site file uploads failing, subdirectory subsites upload fine
- Subdomain Wp-Admin Not Found
- Run “get_the_post_thumbnail” with a different table prefix?
- Pick your brain on wp-config.php if statement for multisite
- All links to images are broken in a subdomain multi site environment
- WordPress Multisite restict user access
- Multisite admin panel not working after the update
- Do I need to create a multisite for querying posts from multiple WordPress sites?
- WordPress Network / Multisite login to one site allow access to all