WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 8 years ago

#13752 closed enhancement (wontfix)

multisite loop

Reported by: youngmicroserf Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords:
Focuses: Cc:

Description

I've been experimenting with multisite/wpmu and it would be great if there were an actual multisite loop - added "blog" parameter to wp_query/querypost. It's possible to emulate a multisite loop with "switch to blog", "get_posts" and merged arrays, but it requires a hand-written paged navigation adding some arguments to the navigation links. It would be great if there was either a way to directly add blog parameter to the query string.

Change History (5)

#1 follow-ups: @nacin
11 years ago

  • Keywords 2nd-opinion added; multisite loop removed
  • Milestone changed from 3.1 to Future Release

Switching blogs should be done sparingly. It's intensive depending on what you're trying to do, and frankly it is only an emulation, so providing native support of looping through multiple blogs can only go so far.

Suggesting wontfix based on the existing solution.

#2 in reply to: ↑ 1 @youngmicroserf
11 years ago

Replying to nacin:

Switching blogs should be done sparingly. It's intensive depending on what you're trying to do, and frankly it is only an emulation, so providing native support of looping through multiple blogs can only go so far.

Suggesting wontfix based on the existing solution.

Well in my case I'm building a community blog and want editors to be able to "lift" extraordinary community posts to the main public blog. Since I can't use a joint query or join query objects with common sorting criteria, I'm currently using get_posts to get two arrays for the two blogs, according to the custom pagination variables, that will then be joined and sorted by date. Knowing the blog ids, switching isn't that relevant here. But it would really be great to have a "blog" variable in the query_post, or be able to merge two queries by, say, date, or category, so the native pagination would work for combined sets of posts.

The switching part is necessary on the display side - Permalinks of posts from blog 4 in a combined stream of blogs 1 and 4, displayed on blog 1, will only work when the blog has been switched prior to the display code. So currently, I parse the URL of the current post's GUID and see if it has "community" in it. If so, the blog will be switched.

I think multiblog setups will become more common due to the WPMU merge in 3.0, so I'd say, an easier way to do this would be appreciated not just by me...

#3 in reply to: ↑ 1 @wpmuguru
11 years ago

  • Keywords 2nd-opinion removed

Replying to nacin:

Suggesting wontfix based on the existing solution.

I agree. Something like this is not scalable to a network of more than a handful of sites. I suggest the reporter check out Donncha's sitewide tags plugin: http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

#4 @gazouteast
11 years ago

Surely using a "fed blog" via RSS to a central feed is the way to go here?

Or, a post meta object taggable by super admin that can trigger a merged RSS into a home blog category or something along those lines?

Or, a "Super Admin please include me on the home site" reviewable tool of some sort

All sounds like plugin territory to me.

#5 @jeremyfelt
8 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Consensus is that this feature is best left to a plugin.

Note: See TracTickets for help on using tickets.