Signed-in as admin on just part of the site

I discovered that by adding a call to get_currentuserinfo(); in header.php the problem appears to be solved. I still do not know why it happened, but at least this is a working solution for anyone else who happens to have this problem. Note: Following @jgraup’s suggestion above, I’m posting this as an answer. However, I … Read more

Adding admin for specific users

You can use add_role function : add_role( $role, $display_name, $capabilities ); Just set your custom values as you wish : add_role(‘basic_contributor’, ‘Basic Contributor’, array( ‘read’ => true, // True allows that capability ‘edit_posts’ => true, ‘delete_posts’ => false, // Use false to explicitly deny )); Plugin : https://wordpress.org/plugins/user-role-editor/

wordpress ajax return 0

So, if you want it to fire on the front-end for both visitors users and logged-in users, you can do this: add_action( ‘wp_ajax_my_action’, ‘my_action_callback’ ); add_action( ‘wp_ajax_nopriv_my_action’, ‘my_action_callback’ ); Example add_action( ‘wp_ajax_GetPostMedia’, ‘GetPostMedia’ ); add_action( ‘wp_ajax_nopriv_GetPostMedia’, ‘GetPostMedia’ );

Delete all blogs on multisite

I was able to get a work around in place. Since I was deleting all blogs with no user interaction. I created two mysql queries and ran them. The first was to drop all tables associated with the given $blog_id the second was to remove that row from the wp_blogs table. $blogs = wp_get_sites( array(‘limit’ … Read more