Articles of multisite

Stop WordPress Entirely and Run My Own Code

I have a site that must be deployed in a WP Multisite environment but none of the code in the site uses WordPress at all. How can I intercept WordPress, perhaps at ‘init‘, and tell it to stop doing anything and let me take over? I tried just putting everything in my index.php file and […]

WordPress Multisite – get_plugin_data()

I use WordPress Multisite. I have multiple sites with plugins installed. I can successfully get a list of the plugin paths with the option value active_plugins from each site. I can not get additional data from get_plugin data. I use this code: $plugins = get_blog_option($blog_id, ‘active_plugins’); foreach( $plugins as $plugin ) { var_dump( get_plugin_data($plugin) ); […]

Network: retrieve a list of latest posts

I need to list all the latest x posts from the whole Network in my WordPress Network. I am already using the Sitewide Tags plugin to collect all posts in a separate blog, but I also need to list the latest posts elsewhere. Most scripts and plugins I have been looking at only list one […]

Within the database, where is the flag which says that a user has Super Admin rights?

I have an user in a WordPress Multisite installation and have access to the Mysql database, I would like to give myself super-admin rights to access the wp-admin/network page. Where can I do it on Mysql? I looked the database and I think the wp_usersmeta table is the one, but I have no idea how […]

get_option compatible with wordpress network (multisite)?

I have this function in a plugin that works on wp install but it doesnt work on wordpress MU. if( !get_option( $option-name ) ) { // something } else { // something else } How can I make the get_option compatible with Multisite install. // I am using redux framework, I created an option and […]

current_user_can('Administrator') does not return true in multisite if user is Administrator but NOT Super Admin

I have a multisite WordPress installation set up, and have a user who is set to an ‘Administrator’ role on both sites. However, the function current_user_can(‘Administrator’) does not return true when logged in as them, which I expected it to. My user account, however, is an ‘Administrator’ on both sites, and also a ‘Super Admin’ […]

How to get a user role of a specific blog in multisite?

How can we get a user’s role of a specific site on a Multisite network? Let’s say the user is a subscriber on the parent site and admin of his own subdomain. Is there a way to only return the role on the parent site or by a specific blog id? Ex: get_wpmu_user_role($user_id, $blog_id);

Activate Child Theme with Codex

I know there is an option to have the following code in the wp-config.php file: define(‘WP_DEFAULT_THEME’, ‘x-child-integrity-light’); define( ‘TEMPLATEPATH’, ‘wp-content/themes/x’); I currently have this commented out and I’m trying to use the WP Replicator to replicate sites in a multisite install. I’d like to have the code automatically activate the child theme when it’s installing […]

Is there a way to run upgrade.php for one blog?

I just ran the auto update to verion 3.9 today, but am having problems with the “Network Update”. I seem to have a firewall or network problem with this error : Your server may not be able to connect to sites running on it. Error message: couldn’t connect to host Anyways, is there a way […]

Sharing Header Components Across Multisite

I have a multi-site platform and I’m trying to share the menu that I have in main with other sites that are located in different folders. This is the PHP tag in the main that pulls the menu which I also need in the header of other: <?php dokan_header_user_menu(); ?> I tried using it as […]