• Resolved pyjamaman

    (@pyjamaman)


    I notice that get_body_class() adds the class no-customize-support if the admin bar is showing, but I can’t find any reference to what the class does.

    If you’re logged into WordPress and viewing the themes page, you have a front end that includes a “customize” button, being shown within a body that has a no-customize-support class.

    If you customize the background and then view your website while logged in, you’re viewing a customized background created by a body with both no-customize-support AND custom-background classes.

    So what is no-customize-support being used for?

Viewing 3 replies - 1 through 3 (of 3 total)
  • CSS classes do not do anything by themselves. They are there for theme (and possibly plugin) developers to use when applying CSS.

    Thread Starter pyjamaman

    (@pyjamaman)

    Okay maybe I used the wrong title – should have been “What would/does anyone use the no-customize-support class for?”

    My point is that WordPress can add a lot of classes and it’s pretty clear how you would use all that I’ve seen:

    Use the ‘home’ class to style the home page
    Use the ‘blog’ class to style the blog page
    Use the ‘single’ class to style a page displaying a single post
    Use the ‘attachment-id’ class to style the attachment with the specified id….

    What would/does anyone use the no-customize-support class for? Given that it can be combined with the customize-background class, you obviously don’t use it as an indication that you should be ‘not-customizing’!

    It’s probably not important, and best just ignored, but I’m trying to get my head round how WordPress works, and the class name seems very counter-intuitive and potentially confusing.

    Thread Starter pyjamaman

    (@pyjamaman)

    Okay, I worked it out – in case anyone’s interested:
    When the admin bar’s visible the class no-cusomtize-support is always added to the body tag. Then, if Javascript is supported, a js script runs and checks if customzing is supported, and if it is, the js changes no-customize-support to customize-support.

    But if you look at the page source, you only see the original classes, before the Javascript, so it will always be no-customize-support.

    So I was wrong – not confusing at all!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘What does no-customize-support class do?’ is closed to new replies.