Tag Info

New answers tagged

0

Have you looked at the Theme My Login plugin? It will do some of what you want, and you can customize it by writing a theme-my-login-custom.php file (assuming you know enough about PHP and Wordpress to do so).


0

Thanks @timocouckuyt, that works fine but you also need this one for the /wp-admin/upload.php link : add_filter('pre_get_posts', 'hide_posts_media_by_other'); function hide_posts_media_by_other($query) { global $pagenow; if( 'upload.php' != $pagenow || !$query->is_admin ){ return $query; } if( !current_user_can( 'manage_options' ) ) { global ...


3

admin_init runs on admin pages, not the front end. The equivalent front end action, init, is too early to check is_page. A safe action for redirection is template_redirect: function xyz() { if( is_page( 172 ) && ! current_user_can('update_core') ) { wp_redirect( home_url() ); exit; } } add_action( ...



Top 50 recent answers are included