Is mature Multisite

The current WP_Site object is saved as global $current_blog, so you can use global $current_blog; if ( isset( $current_blog ) && $current_blog->mature ) { … } There’s no convenience helper method to fetch this as there is get_current_site() for $current_site; there is also get_site() which you could use get_site()->mature but that doesn’t use the already-loaded … Read more

After switch domain, some parts of my site still point to my old domain

Some themes use url in /wp-admin settings menu url. Please also change this. And another problem is full-urls in your db. You should change these urls in db. https://wordpress.org/support/article/changing-the-site-url/#changing-the-url-directly-in-the-database BTW, if you are using phpmyadmin, search old url in all tables (you can search all tables when click the db not any table and you … Read more

Display posts from one network site on another

You are looping through the posts queried before your switch_to_blog() statement. Your code appears to be from a page template which is executed AFTER the main query has run. To be clear, the main query is run before the template code is executed. Switching to another site after that does not update the query, therefore … Read more

Problems with WordPress multisite directories/url structures and admin access after migration

I don’t know how the migration was executed, but here are some things that have caught me out in the past. Files: Check the .htaccess and wp-config.php files. htaccess for a multisite should look something like this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ … Read more