WordPress.org

Forums

Customizr
[resolved] How to remove the Customiz'it and Customizr buttons (12 posts)

  1. RustyWood
    Member
    Posted 1 year ago #

    Hi

    How do you remove the Customiz'it (blue button) and Customizr (green button ) from the top admin bar.

    When I set the site user to editor it was fine, but since using the Adminimize plugin' I'm unable to hide them now.

    Thanks

  2. rdellconsulting
    Member
    Posted 1 year ago #

    Customiz'it (blue button)

    #wp-admin-bar-tc-customizr {
      display: none;
    }

    Customizr (green button )

    #wp-admin-bar-tc-customizr-help {
      display: none;
    }

    Interesting requirement!

  3. rdellconsulting
    Member
    Posted 1 year ago #

    Given the technical questions you ask, I'd recommend you look at Firebug Video which would help you fix these issues (obviously, this is how I fix most questions on the Forum)

  4. RustyWood
    Member
    Posted 1 year ago #

    Thanks, yes I did already find those selectors and used them but they don't work..!

    To be honest I only use Firefox to see how bad my site will look .

    Cheers

  5. acub
    Member
    Posted 1 year ago #

    The display of those buttons is hooked to the "edit_theme_options" capability (in inc/admin/class-admin-customize.php).

    So the buttons will only show up to admins and super-admins, who can get to theme options pages anyway, so the buttons are useful, while they won't show up for levels below admin, unless you've given them the "edit_theme_options" capability, in which case the buttons are useful.

  6. RustyWood
    Member
    Posted 1 year ago #

    @acub

    I have given the user "editor" "edit_theme_options" capability, but this is just to manage widgets ( as I believe you are unable to allow just widgets without "edit_theme_options" being used ).
    I'm using the Adminimize plugin' but I am unable to remove the buttons now that "edit_theme_options" capability has been used .

    Thanks for all you information and help

  7. acub
    Member
    Posted 1 year ago #

    Copy customizr/inc/admin/class-admin-customize.php to [your-child-theme-folder]/inc/admin/class-admin-customize.php and change 'edit_theme_options' to 'update_core' on line 74 (in 3.0.9 - might be different in later versions).

    I'm assuming you haven't given your editors the right to update WP.

    Alternatively, you could use the code provided above by rdellconsulting. All you have to do is input it in the Custom CSS panel of Customiz'it!

    However, that solution has two minor disadvantages:
    1. The button is still there. A technical savvy editor who would look at page elements with a web-dev tool would be able to find and display it.
    2. It will hide the buttons for all roles, including admins.

  8. RustyWood
    Member
    Posted 1 year ago #

    Thanks for the help, I'll give it a go.

    Copy customizr/inc/admin/class-admin-customize.php to [your-child-theme-folder]/inc/admin/class-admin-customize.php and change 'edit_theme_options' to 'update_core' on line 74 (in 3.0.9 - might be different in later versions).

    I'm assuming you haven't given your editors the right to update WP.

    No I haven't !!

    Does some CSS only work within the Custom CSS panel of Customiz'it! ?

    I'm fine with CSS and had already tried those selectors out a couple of weeks ago in the style.css of the child theme, which does not work!! Thats why I asked here..

    Thanks `again for the update

  9. acub
    Member
    Posted 1 year ago #

    CSS, compared to other languages has a very logical approach:

    selector {rules}

    The rules apply to all elements matched by the selector. Whenever some CSS rule doesn't apply to your selected element it's one of these 4 cases:
    a) you have an error or a typo in either the selector (and it's not matching the wanted elements) or the rules and the browser doesn't know what you mean (for example you typed widht:200px; instead of width:200px;)
    b) you have an open set of rules before your declaration and that's preventing the browser to read your selector properly, thus not matching the wanted elements;
    c) you are inside a media query that's not matching your display. Example:

    @media (max-width: 979px) and (min-width: 768px) {
    selector {rules}
    selector {rules}
    selector {rules}
    /*
     * All the rules above will only apply to the selected elements on
     * screens wider than 768px but narrower than 979px. This is how
     * responsive layouts work. Different rules for different widths.
     */
    
    } /* <-- this accolade closes the media query */
    
    /*
     * The code below will apply to the elements matched by the selectors
     * regardless of screen width (it's outside the media query).
     */
    
    selector {rules}
    selector {rules}
    selector {rules}
    ...

    d) somewhere in your CSS there is a contradicting rule that has priority over yours.

    Besides, the code is very simple. It says: do not display element with id="wp-admin-bar-tc-customizr" and element with id="wp-admin-bar-tc-customizr-help". And those are the correct ids of the two buttons.

    If you provide me with the link to your website I'll tell you which of the 4 it is and what you need to do to make it work.

  10. RustyWood
    Member
    Posted 1 year ago #

    Hi like I said before CSS is not my weak point php is ..!

    Thanks

  11. acub
    Member
    Posted 1 year ago #

    If your problem is resolved please mark this topic accordingly.

  12. laura.lee
    Member
    Posted 10 months ago #

    **Is it a technical question to ask to have the green HELP button removed? Personally, my solution is to remove this theme. For whatever reason, my Admin Editor Pro plugin isn't working right now on an install on a managed wordpress site I moved to. If that plug-in will work and install on my hosting... and I can remove that HELP button with a simple click, I'll try out the theme. But I will not spend my time reading something to learn how to remove it. :)

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.