Title: Linking post libraries in multisite environment
Last modified: November 29, 2020

---

# Linking post libraries in multisite environment

 *  [drosehill](https://wordpress.org/support/users/drosehill/)
 * (@drosehill)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/linking-post-libraries-in-multisite-environment/)
 * 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 5 years, 6 months ago by [drosehill](https://wordpress.org/support/users/drosehill/).

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/linking-post-libraries-in-multisite-environment/#post-13788084)
 * 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.

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/linking-post-libraries-in-multisite-environment/#post-13788084)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
