The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
17 views

the_post() within switch_to_blog() altering my excerpt

I have a strange problem I'm facing when using WP_Query with multisite in a plugin I'm writing which hooks into add_meta_boxes. I'm wanting to display all post titles in a dropdown in a meta box. ...
1
vote
1answer
43 views

Switch_to_blog() outside wordpress

how can I load switch_to_blog() function outside wordpress? $blog_id = '7'; require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' ); switch_to_blog($blog_id); echo get_option('blogname'); ...
0
votes
1answer
39 views

Strange switch_to_blog() issue

OK, so WordPress has been destroying me this afternoon and this particular issue I really can't figure out. We are building a multisite network and for our particular purpose need to loop through each ...
12
votes
1answer
247 views

How can I trust switch_to_blog()?

When I call switch_to_blog() with a blog id, I don’t know if that blog actually exists. The functions returns always TRUE. Here is my problem: switch_to_blog( PHP_INT_MAX ); $post = get_post( 1 ); ...
0
votes
1answer
61 views

Access from template info of another blog (in the same network)

In my root blog (1), i have a custom post type that can be linked to an existing blog of my network. It does so by recording in post metas the ID of the blog it is linked to. I use _blog_id as a name ...
2
votes
0answers
478 views

Get Recent Posts by Date in Multisite

Everything in explanation is about CDTuts I've created a WordPress Network and I want is to get the recent posts from all of the selected subdomain blogs. I need to get the latest All organized by ...
0
votes
2answers
1k views

Get the excerpt by page ID from another blog in a wordpress multisite?

I am trying to get the first paragraph on a page where page ID=2 and blog ID=1. I want to display this paragraph on a page in blog id=2. I have added the following code to the template page. //gets ...
0
votes
1answer
44 views

Best Practise: Linking to WPMU sites from other sites

I'm digging through WPSE, and WP Codex/Core, and I am looking for essentially wpmu_blog_link( $blog_id ), which would essentially be home_url() with a parameter to pass the blog_id. I could easily ...
3
votes
1answer
401 views

switch_to_blog() performance considerations & alternatives

I'm currently in the conceptual phase for a multisite network. The rough idea is: There are multiple networked sites and all publish posts for their own. The network admin is able to establish ...
0
votes
1answer
359 views

Upload images from one site to another in Multisite

My multisite setup has one sort-of-admin site, where users can insert/edit posts and specify on which site they want 'em published. This is a contract requirement and cannot be changed. EDIT: Check ...
3
votes
1answer
2k views

Merging multiple wp_query objects

I have the code below for a multisite install. It works fine, but I need to merge each WP_Query loop object from each multisite together for use in another template with the WordPress loop. Is this ...
0
votes
2answers
211 views

switch_to_blog() for parent theme

all. Just trying out switch_to_blog() as a way to have a child site get some news items from the parent site. Problem is, the parent site--first tables in database--doesn't have a number, i.e., ...
3
votes
1answer
1k views

latest 5 posts using switch_to_blog loop

im sure i must be doing something wrong and would really appreciate a little help. I am trying to loop through all of my Sub Dir "Multisite" blogs using switch_to_blog, below: global $wpdb, ...
4
votes
5answers
2k views

Sharing Dynamic Sidebars across Multisite Blogs

I'm trying to find away to retrive a dynamic sidebar from one blog and print it on another blog in the same install of Wordpress Multisite. I have tried switch_to_blog($blog_id); ...
1
vote
1answer
966 views

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?

I am using a new blog on WPMS (3.0.1, updating is not an option) to aggregate posts (and their featured image) from a few blogs on the same install, and I have to do it programmatically rather than ...
0
votes
1answer
747 views

Is it a bad practice to use switch_to_blog in the frontend?

From Wordpress Codex (although related to the same function in WPMU and not WP3.0+): http://codex.wordpress.org/WPMU_Functions/switch_to_blog it says: This switch is to be used for internal and ...
0
votes
1answer
333 views

Bug using wp_insert_term with switch_to_blog

I'm running a network of about 80 sites using WP multisite 3.2. I'm experiencing irregularities using switch_to_blog whith wp_insert_term. To test this I have disabled all plugins, and am testing on ...
0
votes
1answer
154 views

Trouble with SQL SELECT inside switch_to_blog()

I'm using switch_to_blog() and restore_current_blog() to perform some functions across a multi site install. One of the things I'm trying to do is select a very specific post using get_row(). My ...