Get Recent Posts by Date in Multisite

Since wordpress multisite uses different tables for all blogs, it is very inefficient to get all recent articles of all blogs (content aggregation) on display time since you have to query all blogs, sort the articles by date and display the ammount you need. Plugins like WordPress Post Indexer (https://premium.wpmudev.org/project/post-indexer) additional write all posts into … Read more

Is there an easy way to separate themes on network?

You’d have to make you site categories slug match your theme categories folder names. Here’s how to filter themes: Hide a theme on list of themes in wp-admin without editing core files And then, supposing a site has the category a-p and the themes are stored in themes/a-p/, this will filter them out: add_filter( ‘all_themes’, … Read more

What is a Network Activated Plugin Exactly?

Network Activate does pretty much what you thought it does: It activates the plugin on all sites in the network. It also takes it out of the default Plugin view on the plugins screen for all those sites, so they no longer have the option to either activate it or deactivate it. So if you’re … Read more

WordPress 3 Multisite using subdomains.- DNS on Cpanel question

When you’re adding the wildcard subdomain, you need to make sure it is registered last in your ANAME records. Then make sure all of the static subdomains (webmail.domainname.com, cpanel.domainname.com, etc) appear before it. When using wildcard subdomains, the server starts at the top of the list and works its way down. If all you have … Read more

Different back-end colour scheme for the different sites of a multisite

Add to your functions.php file the following code, this will hook into your admin header section and will place the style you chose accordingly to the matching site. add_action(‘admin_enqueue_scripts’, ‘my_admin_background’); function my_admin_background() { wp_enqueue_style( ‘custom-style’, get_template_directory_uri() . ‘/css/custom_script.css’ ); global $blog_id; $color=””; if ($blog_id == 1) { $color=”white”; } elseif ($blog_id == 2) { $color=”red”; … Read more

Multisite – Keep users logged in only to their site

As far as I remember the users in multisite are shared. They are tracked in one database table and use same cookie for authentication. The more practical approach is to track not merely login status, but capabilities. Users should be exposed to actions/information that they can perform/see, according to their Role on specific site. You … Read more