WordPress.org

Ready to get started?Download WordPress

Forums

Show categories and items to another blog (4 posts)

  1. boombari
    Member
    Posted 1 year ago #

    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.

  2. 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?

  3. boombari
    Member
    Posted 1 year ago #

    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"...

  4. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic