Hi, I made sure that I did a lot of searching before posting this request. I was not able to find anyone who has already asked about this:
How can I hide the Enfold Admin Theme Options from the WP Admin backend? I do not want to disable any part of it. I just want it completely hidden and only accessible by typing in the right URL ( http://www.yoursite.com/wp-admin/admin.php?page=avia ) I came across this post and many others like it: https://kriesi.at/support/topic/hide-settings-code-help/ but these appear to only show you how to comment out certain sections of it. I want the link completely gone from the side menu. I have already learned (from searching) how to remove it from the Admin bar. Thanks for your help!
Hi mercury9!
Insert this code into the child theme functions.php or enfold/functions.php file:
add_action('admin_print_scripts', 'avia_gravity_forms_admin');
function avia_gravity_forms_admin()
{
echo "<style type='text/css'>";
echo "#toplevel_page_avia { display: none; }";
echo "</style>";
}
It will hide the menu item on the admin page.
Best regards,
Peter
This worked very well. Thanks! One more question. How would I also be able to do this for the Portfolio post type in the left side menu and also how would I remove the link “Portfolio Entry” in the Admin bar listed under the “New” dropdown. Please advise and thank you SO much for your assistance. This theme is awesome!
Hey!
Thank you for the update.
Replace Dude’s code with this:
add_action('admin_print_scripts', 'avia_gravity_forms_admin');
function avia_gravity_forms_admin()
{
echo "<style type='text/css'>";
echo "#toplevel_page_avia, li#menu-posts-portfolio, li#wp-admin-bar-new-portfolio { display: none; }";
echo "</style>";
}
Cheers!
Ismael
PERFECT. Thanks and have a great day!