I have a network of two sites, A.example.com
and B.example.com
. I’d like it so that if I create a page on A
with a permalink of /Widgets
I can access it on B
using the same relative permalink but without having to actually create the content on B
. (One site has user profiles that we’d like to continue to manage on a single site but expose on the other site, too.) Site B
would still “look” like B
but the content would come from A
.
I was thinking of hooking into init
but didn’t really know what to do and the documentation isn’t really helpful. Or would it make more sense to hook into pre_get_posts
and just change the table prefix that I’m querying?
(I know MS isn’t intended for this model and that I’ll have to handle repercussions like links within the content but that’s not a big deal.)
Thanks
[EDIT]
Sorry, /Widget
was a bad name probably, these aren’t WordPress Widgets, just regular posts.
Hope I understand you correctly. Not sure if your /Widgets content would be actual widgets, or just posts/pages, but I’ve been using this plugin for duplicating content between sites on a multisite network: http://wordpress.org/extend/plugins/diamond-multisite-widgets/
Use the “Broadcast on the network” feature. You can select on which sites you’d like to duplicate the content. 2 caveats:
I ended up going with
pre_get_posts
.