New User Approval

You need to add_action two time for this. One at the time of user registration & second when user tries to login. function wpse_149067( $user_id ) { if ( user_can( $user_id, ‘tutor’ ) ) update_user_meta($user_id, ‘verified_user’, false); if ( user_can( $user_id, ‘student’ ) ) update_user_meta($user_id, ‘verified_user’, true); } add_action( ‘wp_login’, ‘wpse_149067_check_user’, 10, 2); function wpse_149067_check_user($user_login, … Read more

WordPress plugin creating sidebar on the theme/page

You need to create a widget in your plugin. Once you have the widget, just drag and drop it into the side bar. This might help. http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-wordpress-widget/ http://premium.wpmudev.org/blog/create-a-wordpress-widget/

Theme specific plugin, how?

You can ask for the activation of the theme. You can get the value of the options values templateand stylesheet. The stylesheet get the active style, a benefit if the user use an child theme. As example if ( ‘my_theme’ === get_option( ‘stylesheet’ ) ) …. Also you can use the hooks for template and … Read more