K
K
kryamk2021-06-17 16:41:39
WordPress
kryamk, 2021-06-17 16:41:39

How to create a record on the main domain and have it spread to other subsites in multisite mode?

The idea is to create and change entries on the main site, and all changes are transferred to others.
Now, on the templates, I switched all sites to the main one using In the right places (like the contacts page), I return the current subsite with the help of I display, for example, a list of entries in the news heading. For links, I switch to the current subsite so that the links are of the subsite. In the output template of a separate post, I switch to the main site. It works all the rules, on those that were cloned by the NS Cloner - Site Copier plugin (I use it to create subsites), but if you manually create an entry on both the main and subdomains, it doesn’t work, apparently the url and id of the entry on the main and subsites do not match
<?php switch_to_blog(1); ?>
<?php restore_current_blog(); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Turnaviotov, 2012-06-26
@foxmuldercp

Indeed, publish for a beta test and give a link, I'll try to see it on my 800 lumia

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question