The typical answer to anything switch_to_blog()
is — no it shouldn’t, yes it is a mess. Simply put WP architecture doesn’t posses the capability of making such clean switch from one blog to another in the runtime. It’s a bit of wishful thinking — some things work, some very much break.
In your specific case it is a little puzzling why would query–related hooks fire, since the switch itself shouldn’t involve querying posts. The most reliable would be to dump how they are called up, for example using wp_debug_backtrace_summary()
.
Related Posts:
- How can I trust switch_to_blog()?
- Sharing Dynamic Sidebars across Multisite Blogs
- Hook filter to change wp_upload_dir() path in multisite
- latest 5 posts using switch_to_blog loop
- WordPress 3.2(Multisite) – How to add custom user meta fields to signup form?
- Switch_to_blog() outside wordpress
- why when I try to insert an image attachment along with a post does wp_get_attachment_url give me a very wrong file path?
- Upload images from one site to another in Multisite
- Limit entries number on network/sites.php
- What is the way to share data between sites in a multisite
- get post id by $content (so by post content)
- Cannot use pre_set_site_transient_update_themes from within a theme in multisite
- Register submenu on network menu from the subsite
- Conditional Image Sizes for Use via Theme Customizer Upload Only
- Include Site 1 Posts in Query for Sub Sites
- Sort posts according to date
- Multisite switch to blog
- Best Practise: Linking to WPMU sites from other sites
- Trouble with SQL SELECT inside switch_to_blog()
- Display posts from one network site on another
- Get variable from previous blog while using switch_to_blog
- Shared upload folder in wordpress multisite with custom sub site domain pictures URL:s
- switch_to_blog($blog_id); still writing to main blog
- fatal Error undefined function switch_to_blog()
- How to get all pages on specific blog after switch_to_blog?
- Access from template info of another blog (in the same network)
- How to disable style filtering in post?
- Get the excerpt by page ID from another blog in a wordpress multisite?
- The wpmu_blogs_columns filter is not working
- Redirect to Multisite site 2 if site 1 has a setting
- Multisite, using switch_to_blog in filter
- Memory growth with new additions to WordPress Multisite
- How to use WordPress Multisite With Different Domain Names?
- How To Add Custom Form Fields To The User Profile Page?
- Where are available Roles Defined in the wp_ database?
- restore_current_blog() vs switch_to_blog()
- Can i merge 2 new WP_Query($variable) ‘s?
- How to disable a network enabled plugin for just one site?
- How to reliably flush rewrite rules on multisite?
- 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?
- 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
- 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?
- DB connection error after copying a WordPress Multisite instance to a second location
- Redirect Main Site to Subsite in Multisite WordPress
- 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?
- 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?
- $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?
- 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?
- Querying posts from multiple sites in a network?
- Plugin for editing options on multisite?
- What do I need to do to convert my MultiSite from HTTP to HTTPS?
- is_front_page() malfunction?
- WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
- 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