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 add a shortcode button to the TinyMCE editor?
- Uncaught Error: Call to undefined function wp_generate_attachment_metadata() @ wp-cron
- Using require_once in a Plugin?
- How to call plugin path in JS?
- Is it possible to run plugin code when a multisite blog is deleted?
- Multi domain, multi sites with different themes and content
- Getting Custom Post Type content from main-site of a Multisite
- Stackoverflow type of badge plugin giving warnings in WordPress 3.5
- Plugin.php: PHP Notice: Undefined offset: 0 in
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- How to get last_updated and newest_blogs in WP 3.0
- Network: retrieve a list of latest posts
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- Executing my function once on a specific time
- How to access data in wordpress database externally using php
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- Why “Call to a member function on a non-object” in plugin only?
- After upgrade to php 7 plugin/them updates broke [closed]
- WordPress 4.8.1 php getting commented
- Multisite – maximum number of users with specific role
- Issue running db create table query from static method
- Allowing users to Sign-up > Login > Post articles that need approval
- Use $variable from file1.php in file2.php (different file paths)
- How to include a custom field in the woocommerce email?
- All custom widgets are not showing in widget area at the same time
- Wierd site output [closed]
- How to write to a separate PHP file in plugin settings
- How to display results from a data table with an encrypted user id?
- Activation flow of a plugin in a multisite environment
- Checkbox show / hide output result
- Attempting to list all product categories and the price range of all products within them
- Creating an array from form inputs before it is posted to the options database
- Get a value from a shortcode for another function
- Plugin which unlock free gift when you reach some amount in cart
- How can I create a secure file download in WordPress?
- Ajax call to php function doesn’t work PHP code
- WordPress PHP error getting posts from another wordpress blog
- How to insert image into the Settings Page of a Plugin?
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Cannot access variables within a widget
- Postal address auto-complete on profile page
- WordPress Related Plugin – Adding an image
- How to delete remain data in WP database after deleting custom post via admin interface
- How to use ‘Event Manager Shortcodes’ plugin via the php code? [closed]
- Populate Woocommerce order notes with custom field value
- Woocommerce Product Add-ons – Auto-select first option
- Strict Standards: Non-static method in sidebar generator
- Fast Tranfering my WordPress site to another server
- How to add custom html to the Media > Attachment Details modal?
- I want create woocommerec match products columns
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)