• I’m looking for a solution to this multisite issue: I have several subsites and one main site. The main site displays the top stories from the subsites. Problem: each site has access only to its own tags. Other sites don’t know about other subsite tags. How do I access from the main site the tags on subsites?

    With a single WordPress installation the issue would be trivial. Not so with Multisite.

    Thanks.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The sub-sites are very much like totally separate sites. They each have their own DB tables for data. It just so happens they share a common code base. There is very little in common data-wise. For one site to get all tags used in the others, you’d have to query every site in turn for their particular tags. You can switch between sites in PHP with switch_to_blog(), then query for its tags. Then merge the results together to get one comprehensive list.

    Alternately, you could get tags for each site in turn through their respective REST API.

Viewing 1 replies (of 1 total)
  • The topic ‘Shared Tags for Main Site?’ is closed to new replies.