WordPress.org

Support

Support » Multisite » Show categories and items to another blog

Show categories and items to another blog

  • Hi all,

    I set up a network of websites with multisite. One of these is the main blog.

    I want to show the categories and items common to all blogs.

    I used the function switch_to_blog (1) where 1 is the ID of the site “father” to populate a select with category values​​.

    Obviously selecting a category, show me the 404 page as the blog “child” category that does not really exist.

    Should I put a condition to understand when making the switch between blogs, but I do not know where to insert it.

    Who can help me?
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I want to show the categories and items common to all blogs.

    Doesn’t really work that way. All sites on the network are content-segregated, they don’t share categories and items.

    What goal are you trying to accomplish by showing the items ‘in common’? Do you want a list of all posts made on topic X in all blogs?

    Hi,

    I know that the contents are different for each blog, but I want to keep in sync all items of a particular category of all blogs. Do you have any idea?

    With “switch_to_blog ()” can, for example, to populate a select quietly. The problem is to insert a condition, and do not know where, into the template files singles, loops, etc. to change the select query before giving the “switch_to_blog”…

    but I want to keep in sync all items of a particular category of all blogs

    You need to elaborate this. If you mean “I want all my sites to have the same posts in this category” then I want to tell you “No you don’t.”

    If you mean “I want a list of all posts in category X on all blogs” that’s VERY different.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show categories and items to another blog’ is closed to new replies.
Skip to toolbar