Articles of blog id

Simplest way to query with blog_id?

What is the simplest way to query posts using blog_id? I have a post type called video that holds, not surprisingly, multiple embedded videos. Each post has a different video. I would like to display a specific video in specific locations across different sites. The video posts are on Site 1, and other sites in […]

How to get blog_id of an MU site when running a custom function on the parent site

Simple enough question, but one which is proving difficult to find a solution to. Quick preamble – the situation this is addressing is a MU network using sitewide tags plugin which pulls all network posts to the main site’s home page, then timthumb is used to scale the images of each post which are retrieved […]

How to get current site id? (WPMU)

I am using WordPress with MU activated. I found a function here that supposed to return an object with the current side ID. But it’s returning 1 for all websites. <?php get_current_site(); ?>

Get the User ID Who Owns a Given Blog ID in Multisite

I am working on creating a function that will take a $blog_id and return the corresponding $user_id of the user who owns/created the blog in a multi site network. public function SelectOwnerUserIdFromBlogId( $blog_id ) { … } I have been reviewing the database and the closest thing I can find is looking at the wp_usermeta […]

Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)

page.php (site_id= 1) <?php // view all sites for all users in site network ID 1 $blogs = get_blog_list( ‘0’, ‘all’ ); // ALL BLOGS if ( 0 < count( $blogs ) ) : foreach( $blogs as $blog ) : switch_to_blog( $blog[ ‘blog_id’ ] ); ?> <tr class=”row230<? echo $blog->blog_id; ?>”> <td><a href=”<? echo get_home_url(); […]

Get current Blog ID in Tinymce Plugin Dialog Window in WPMU

is there any way, to get the current blog id in a Tinymce Dialog Window? Currently I only get the id, from the main blog. This is my current code: $wp_load = “wp-load.php”; while(!file_exists($wp_load)) { $wp_load = ‘../’ . $wp_load; if(file_exists($wp_load)){ break; } } require_once($wp_load); global $blog_id; echo $blog_id; $blog = get_blog_details($blog_id); Any help is […]

Multisite Pull Recent Image Attachments from Blog ID

I am creating a WordPress network and am looking for a way to pull recent images from the sub blogs, but I am having some trouble doing so. What is the easiest way to make this happen?

Multisite: I have a gap in my blogs. How to add the missing one?

So I deleted a few blogs that I no longer needed in my multisite…but I didnt realize that it would create a “gap” in my blogs. In other words I now have http://webaddress/wp-admin/network/site-settings.php?id=1 http://webaddress/wp-admin/network/site-settings.php?id=3 And the blog-id “2” is now missing. If I try to use that same link for example with “2” appended at […]

Get Permalink of Network Blog Post

I am trying to write a function that will allow me to specify a post ID and a blog ID, and then have it return the permalink and title of the blog post. I need this to be efficient because the function will be used in a foreach loop that could cause the function to […]

get_current_blog_id returns 1 in multisite setting

I am encountering rather a weirdo situation here. I am currently on a multisite and created a site. This site has a blog id of 3. However, whenever I call get_current_blog_id() it returns 1 (which is obviously a network id). I do not know why but there was definitely a change with the domain. example) […]