I actually solved this… here’s what you need to do if anyone needs to do something similar:
SO, you can’t really query a site, but you can query pages on sites… so what I did was make a new page on the site where everything looked good, embed the shortcode, query that page and the content only on the other site. You NEED to have the site switch to that one to retrieve it though on the other multisite. You can look that up in the wp admin under “sites” to see the site ids.
Example:
<?php switch_to_blog(2); ?>
//changes to the site you want to query
<? $the_query = new WP_Query( 'page_id=229' );
while ( $the_query->have_posts() ) :
$the_query->the_post();
the_content();
endwhile;
wp_reset_postdata();
?>
Related Posts:
- Redirect to another page using contact form 7? [closed]
- PHP Deprecated: Non-static method should not be called statically
- Adding Custom Fields for Img in Posts
- How To Ignore a Filter On Applying Filter the Content In a Function
- Calling function from within functions.php returns unwanted value
- shortcode doesn’t work
- Can’t get custom posts of taxonomy to show
- Shortcode to generate and save password in a file
- get shortcode value
- Storing Options in a Shortcode
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- WordPress on AWS with ELB
- How to put JQuery/Ajax inside shortcode?
- WordPress Shortcode to get URL Parameters $_GET[‘name’] redirects for no reason at all
- WordPress function not being called from jQuery method
- Nested shortcode functions accessing variable
- Some code in shortcode function being ignored
- Subdomains with almost the same content
- How to Create a shortcode to this php function
- What is @Action in WordPress?
- Why shortcode always displayed after footer not in body
- Custom shortcode for displaying user based on a role parameter
- Return multiple values in a shortcode attribute
- Is there a way to convert shortcodes to html content?
- Shortcode not working – quotes seems strange
- Get all the URLs of the pages that uses a specific shortcode
- Add the_post_thumbnail_url to a shortcode in function.php
- Echo out element to another page.
- Adding a Tag Parameter / Filter to My Shortcode
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- How to get current cart values using WC_Shortcodes?
- get_post_meta shortcode returns empty field
- How do I use a plugin’s shortcode attribute value in another function?
- Why does my custom plugin only function correctly once per page?
- Hide content for specific users with id
- Why is my shortcode not working?
- the content of the uploads folder gets deleted periodically, how to figure out what causes it?
- Get Shortcode output to database for static post_content
- Find all strings between an enclosing shortcode
- Posting code inside the post instead of in the template file using shortcode
- How to Set Limit with WordPress Get Bookmarks Shortcode
- Pulling sub-site content into specific pages
- Creating Features List in WordPress Post
- Integrate Razorpay quick payments plugin with contact form7 plugin
- cURL External API request displays content above other content on page
- Subtract Using GravityWP Count Plugin
- How to get URL param for pagination in shortcode?
- qTranslate‑X is not translating all shortcodes
- How to resolve Multisite Speed issues
- pagination on data fetched using SQL query
- How to check if a taxonomy not exists in a plugin
- Use wordpress plugin in codeigniter
- How passing values to construct function with Actions?
- Where are theme codes located for WordPress?
- Inserting custom PHP script on homepage
- Certain functions are undefined when called form mu-plugins
- How to delete all trashed item in one-go
- Is wp-app.php or wp-apps.php needed for WordPress?
- add_action into another add_action not working
- Multisite for Multisite?
- Call plugin with php function
- My plugin won’t return anything [closed]
- Duplicate results are displayed in a custom plugin [closed]
- Anyway to convert a plugin to become a shortcode?
- Check if variable is set in filter
- Finding the screen id of a page generated with add_menu_page
- WordPress custom taxonomy not showing
- My WordPress site when down after installing a plugin and now all I get is a simple white screen [closed]
- Access a particular field in an array
- Notice: Uninitialized string offset: 0 in social sharing mu-plugin
- Render Modula Plugin Shortcode On Ajax Request
- Shortcode to update user meta
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Why is my custom post type not being activated on plug-in activation?
- How to Loop Through all Posts and Count Attachments using Get Media Attachments
- How to add apply_filter for a class property in plugin
- Multisite – maximum number of users with specific role
- Issue running db create table query from static method
- Only allowing some emails to create an account [closed]
- Warning: Use of undefined constant list_all – assumed ‘list_all’ (this will throw an Error in a future version of PHP)
- How to distinguish if a plugin is not installed or just not active
- JavaScript in a PHP plugin
- Checking the count within a foreach loop
- Create a single website with 3 theme options in wordpress
- Does having more than 30 Admin Ajax affects site performance (plugin)?
- Understanding State in WordPress Multisites
- How to have sample page for each new register users in a membership website
- execute function after one completed
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Can i add custom code in Source, Header from function.php?
- WHy custom plugin slows down the loading of the pages?
- WordPress Multisite: Programmatically Activate / Deactivate a Plugin of a Specific Blog
- using do_shortcode
- Why am I unable to load scripts in head in plugin?
- How to make multiple admin pages for one plugin?
- How to show the number of website visitors in my theme
- Setting Up PHP Workflow in WordPress
- php code crashes site – possible syntax error
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Deactivate JS Script in Plugin Shortcode