Determine if a Network has any sites created already

I solved it by doing using this code: global $current_site; $current_site_id = $current_site->id; $args = array( ‘network_id’ => $current_site_id, ); $site_info = wp_get_sites( $args ); $num_of_sites = sizeof($site_info); If anyone has a more elegant way of solving please post your answer.

WordPress Multisite redirect loop

Applying the htaccess for version 3.5+ seems to have worked RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]

Can WordPress Multisite work like a regular site?

My question is if I don’t want to go through all the trouble of changing the site back to a regular WordPress site, can I just treat and use the site as a regular WordPress site? I think you might be overestimating the trouble. If it’s a multisite with just one main site then simply … Read more

use system script advertising in wordpress multisite

I have write : <?php $blog_id = get_current_blog_id(); ?> <?php if( 1 == $blog_id ); ?> <div id=””><script src=””></script><script src=”” ></script></div> <?php elseif( 2 == $blog_id ): ?> <div id=””><script src=””></script><script src=”” ></script></div> <?php else: ?> Default script <?php endif; ?> It correct !?