add_action('admin_init', 'firmasite_remove_dashboard'); function firmasite_remove_dashboard() { if (!current_user_can('edit_posts') && !defined('DOING_AJAX') ) { wp_redirect(site_url()); exit; } }
add_action('admin_init', 'firmasite_remove_dashboard'); function firmasite_remove_dashboard() { if (!current_user_can('edit_posts') && !defined('DOING_AJAX') ) { wp_redirect(site_url()); exit; } }
I’ve created a Child Theme using the Orbisius Child Theme Creator plugin. I then added the tweak for How to fix big logo problem by putting the CSS in the Appearance >> Customise >> Theme Settings >> Custom Css box, but where do I add the above PHP code for admin lockout?
You can directly put it in your child theme’s functions.php file. Also i recommend to inspect our example child-theme in http://theme.firmasite.com/child-theme/