Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #554793

    How can I Remove “Theme Options” from admin bar?

    CSS? or in Theme Functions?

    What is the code to add or remove.

    TY

    #555133

    Hey 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,
    Yigit

    #555145

    Where in Functions.php?

    #555155

    Hi!

    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!
    Yigit

    #555156

    I added to the bottom. Updated and it did not work…

    #555159

    ok, I’m updating the theme will try when done.

    #555162

    I tried again. No change – I left the code in function.php so you can see

    Also provided my creds.

    #555190

    Find anything?

    #555327

    This is still anissue. Any Help

    #555490

    Hey!

    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, 10 months ago by Elliott.
    #1263049

    I 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
    #1263119

    Hi tbc,

    Thank you for sharing :)

    Best regards,
    Victoria

    #1295710

    So 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?

    #1295814

    Hi,

    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,
    Yigit

    #1296204

    … thanks´s – this is working

    #1296304

    Hi,

    You are welcome!

    Future readers, please see – https://kriesi.at/documentation/enfold/personalize-theme/#remove-enfold-tab-from-wp-dashboard

    Best regards,
    Yigit

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Remove "Theme Options" from admin bar?’ is closed to new replies.