• Dear WordPress users,

    I operate a WP Multisite environment for my business.

    One of the network sites is a blog and the other one is the main part of the website.

    I am constantly linking to blog posts from landing pages in the main part of the site.

    Is there any way for a network site to share its post library with another network site?

    For instance, when I’m creating links from the main part of the site, I would like to be able to poll for results in the other site using the WP editor. This would have the added advantage that if the blog resource were to move, the link would remain in place.

    Is there any way to achieve this functionality?

    • This topic was modified 3 years, 12 months ago by drosehill.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    That is possible, but I suspect it would need to be custom coded. All network sites utilize the same code base. How code knows which site it’s working on is through the concept of “current blog”. We can have code switch to another site while the user remains where they are with switch_to_blog(), then back again with restore_current_blog().

    The link dialog queries for posts in the current site. The results are filterable, so a filter callback could switch to another site, query for posts there, then add to or replace the default results with the results from the other site.

Viewing 1 replies (of 1 total)
  • The topic ‘Linking post libraries in multisite environment’ is closed to new replies.