[wp-trac] [WordPress Trac] #13752: multisite loop
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 18 01:28:13 UTC 2010
#13752: multisite loop
----------------------------+-----------------------------------------------
Reporter: youngmicroserf | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Multisite | Version: 3.0
Severity: normal | Keywords: 2nd-opinion
----------------------------+-----------------------------------------------
Comment(by youngmicroserf):
Replying to [comment:1 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...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13752#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list