I have done a search on this topic but was unable to find a solution to this specific question involving wordpress multisite.
I currently have a wordpress network where domain.com is our main site and then each site has been localized with country code domains and also specific country services.
Eg: Main domain.com – Australia domain.com.au – UK domain.co.uk etc
In the back end it is set up as sub directories, domain.com, domain.com/au etc.
What I am looking to do is to set up categories on the main site eg:
Gallery – Australia
– UK etc
When I tick the box for “Australia” it would automatically repost all posts from the sub category “Australia” into configure/set matching categories?
Is there a plugin/solution to this qeury? Have read a lot of articles but were only meant for single site installations.
Untested. Hopefully this works, or at least provides you a starting point.
Caveat: The categories in your root site must have the same name as the site names of your subsites for this to work. ie, to have a post show up in a site named “Australia”, your category on
domain.com
must be named “Australia”.References
is_main_site()
is_multisite()
switch_to_blog()
restore_current_blog()
the_posts
filter