Support » Alpha/Beta/RC » WP 5.8-RC2: Block widget area CSS class

  • Hi guys,

    In Appearance → Widgets I can see there is wp-block-widget-area CSS class applied on the sidebar container.

    Would be great if there was additional class applied based on the sidebar ID such as:

    • wp-block-widget-area--sidebar-1 for sidebar with ID of sidebar-1
    • wp-block-widget-area--footer for sidebar with ID of footer
    • …and so on.

    Thanks and regards,


Viewing 6 replies - 1 through 6 (of 6 total)
  • Or just use the actual ID as it would be used on the front end…
    I mentioned this in Slack, but maybe a Trac ticket would be better.

    Hi @webmandesign,

    Thanks for bringing this up. I’ve looked into it, and you are correct. There is currently no unique identifier that can be used to target a sidebar in the widgets editor.

    I’ve opened up an issue on the Gutenberg repository to explore a way to fix this. Ideally there should be some way to style specific sidebars within the widget editor in a way that the presentation matches the front end.

    Thread Starter WebMan Design | Oliver Juhas


    That’s exactly why I asked 🙂 It would be great if a specific class could be applied as I think there might be some potential issues with ID attribute was used instead.

    Thanks for opening the issue for this. Should I close this topic as resolved then or will you do it guys when the issue is actually resolved?

    @webmandesign Because this was quite a late change, the approach taken was to add a data-widget-area-id data attribute to widget areas in the editor, which should still be selectable via css. That’s in WordPress 5.8.

    Thread Starter WebMan Design | Oliver Juhas


    That’s cool. Thank you for the update @talldanwp

    I appreciate you mentioning this. After looking into it, I agree with you. The widgets editor does not offer a unique identifier for targeting sidebars.
    For more Information click on below Link,
    Ccleaner Torrent

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.