-
AuthorPosts
-
December 18, 2015 at 3:37 am #554793
How can I Remove “Theme Options” from admin bar?
CSS? or in Theme Functions?
What is the code to add or remove.
TY
December 18, 2015 at 7:13 pm #555133Hey scorch20!
Please add following code to Functions.php file in Appearance > Editor
function remove_adminbar_themeoptions() { ?><style>#wp-admin-bar-avia { display: none !important; }</style> <?php } add_action('init', 'remove_adminbar_themeoptions');
Best regards,
YigitDecember 18, 2015 at 7:23 pm #555145Where in Functions.php?
December 18, 2015 at 7:28 pm #555155Hi!
You can add it to the bottom of the file. My personal favourite line to add custom codes is right above following line
add_theme_support( 'automatic-feed-links' );
Cheers!
YigitDecember 18, 2015 at 7:29 pm #555156I added to the bottom. Updated and it did not work…
December 18, 2015 at 7:32 pm #555159ok, I’m updating the theme will try when done.
December 18, 2015 at 7:46 pm #555162I tried again. No change – I left the code in function.php so you can see
Also provided my creds.
December 18, 2015 at 8:42 pm #555190Find anything?
December 19, 2015 at 3:30 am #555327This is still anissue. Any Help
December 20, 2015 at 3:17 am #555490Hey!
That’s not a theme question but you can do this, https://css-tricks.com/snippets/wordpress/apply-custom-css-to-admin-area/, to add CSS to the dashboard area.
In the future I would try posting this in the WordPress support forums as it’s more of a general WordPress question.
Best regards,
Elliott- This reply was modified 8 years, 11 months ago by Elliott.
November 25, 2020 at 6:20 pm #1263049I stumbled upon this post and i think my solution is better so i post it for others finding this thread.
This is easy to solve with a function in your themes functions.php// Hide Enfold add_action( 'admin_init', function () {remove_menu_page( 'avia' );}); // Hide in Backend Menu add_action( 'admin_bar_menu', function ( $wp_admin_bar ) { $wp_admin_bar->remove_node( 'avia' );}, 999 ); // Hide in Admin Bar
November 25, 2020 at 11:01 pm #1263119Hi tbc,
Thank you for sharing :)
Best regards,
VictoriaApril 21, 2021 at 7:53 am #1295710So far, this code has removed the Enfold Theme Options from the admin bar:
$wp_admin_bar->remove_menu('avia'); // Remove theme options
Since 4.8.2 the new Open Street Map is shown in the Admin Bar. How can I adapt the code above to hide the street map as well?April 21, 2021 at 3:14 pm #1295814Hi,
Please add following code to bottom of Functions.php file of your child theme to remove Theme Extensions from admin bar
add_action( 'admin_bar_menu', function ( $wp_admin_bar ) { $wp_admin_bar->remove_node( 'avia_ext' );}, 999 ); // Hide Theme Extensions in Admin Bar
Best regards,
YigitApril 23, 2021 at 6:58 am #1296204… thanks´s – this is working
April 23, 2021 at 11:43 am #1296304Hi,
You are welcome!
Future readers, please see – https://kriesi.at/documentation/enfold/personalize-theme/#remove-enfold-tab-from-wp-dashboard
Best regards,
Yigit -
AuthorPosts
- The topic ‘Remove "Theme Options" from admin bar?’ is closed to new replies.