Problem with context in multisite – getting main site data in every blog (get_pages())

The way you are doing this is not correct. Two possibilities: 1) Create a Dashboard Widget to display the information For the Network Dashboard, but illustrates well: How to Display Network Post Count? Minimal widget: add_action(‘wp_dashboard_setup’, ‘wpse_60096_dashboard_widget’); function wpse_60096_dashboard_widget() { if( current_user_can( ‘activate_plugins’ ) ) wp_add_dashboard_widget( ‘wpse_60096’, ‘Site Pages’, ‘wpse_60096_add_widget_content’ ); } function wpse_60096_add_widget_content() { … Read more

How to show different sub sites based on Member’s user name In word press?

There is a filter called login_redirect which you can use. The third parameter passed to this filter is the user object, so you have all kinds of possibilities to redirect. Like this: add_filter (‘login_redirect’, ‘wpse63660_redirect’, 10, 3); function wpse63660_redirect ($redirect_to, $request, $user) { //is there a user to check? if ( isset( $user->roles ) && … Read more