How to add super admin to all sites

Super admins do have access to all sites, but they don’t show up in “My Sites” by default, which I imagine is where you’re looking. They’ll want to go to the network admin (/wp-admin/network/, then go to all sites from there, then find the site they want to edit and click “Dashboard” (which appears on … Read more

Network Admin “You do not have sufficient permissions to access this page.”

The easiest way to restore Super Admin privileges is to add a bit of code to your theme’s functions.php file to add yourself back: include(ABSPATH . ‘wp-admin/includes/ms.php’); $user = get_userdatabylogin(‘YOUR_USERNAME’); grant_super_admin($user->ID); Once your Super Admin privileges have been restored you can remove this code from your theme.

Post and Page Inheritance to subsites in a WordPress Network

R, the simple solution is to create a 2 post-meta. The first is “Blog id” The second is “Post id” and you use $blog_id = get_post_custom_values(‘blog_id’); $post_id = get_post_custom_values(‘post_id’); if( !empty( $blog_id ) ) switch_to_blog( $blog_id ); $query = new WP_Query( array( ‘p’ => $post_id )); if( $query->have_posts() ){ while( $query->have_post() ){ $query->the_post(); } } … Read more

How do I change the Multisite URL?

There are 5 values need to change. From database. wp_options: options named “siteurl” and “home” wp_site wp_sitemeta: the option named “siteurl” wp_blogs: any entries in the “domains” column that have the old domain name wp_#_options: Each sub-site will have sets of tables that correspond to the blog_id in the wp_blogs table. You need to go … Read more

How to add field for new site-wide option on Network Settings screen?

There’s a wpmu_options action that lets you append more HTML on the Network Settings page. If you want to add your own sub-menu/page to the Settings parent menu: add_action(‘network_admin_menu’, ‘add_my_netw_settings_page’); function add_my_netw_settings_page() { add_submenu_page( ‘settings.php’, ‘Co za asy’, ‘Co za asy’, ‘manage_network_options’, ‘my-netw-settings’, ‘your_form’ ); } function your_form(){ $options = get_site_option(‘your_plugin’); ?> <form action=”<?php echo … Read more