• Resolved stanvb

    (@stanvb)


    Hi,

    Since the new update the text in the sidebar is suddenly underlined, I would like to remove this but can’t find where to do it. Anyone know?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Marius L. J.

    (@clorith)

    Hiya,

    The sidebar on your site appears to be links, and these should (ideally) be underlined.

    This is due to accessibility, in that links should be clearly defined. Although you could use CSS to remove it, I would advise against it, but if you choose to do so, visit the customizer (yoursite.com/wp-admin/customize.php) and select the Custom CSS section where you can add your own styling.

    @stanvb

    Try adding the following to the Custom CSS section in the Customizer:

    
    div.sidebar-main a {
      text-decoration: none;
    }
    
    Thread Starter stanvb

    (@stanvb)

    My man, thanks!

    No worries 🙂

    Stumbled upon the same issue. Didn’t want to do the css override. I didn’t want to have the css rule in the first place. This piece of php will remove the piece of css from the css output:

    add_filter( 'wp_theme_json_get_style_nodes', function($nodes) {
        if (!is_array($nodes)) {
            return $nodes;
        }
    
        $nodes = array_filter($nodes, function ($node) {
            if (
                !empty($node['selector']) &&
                $node['selector'] == 'a:where(:not(.wp-element-button))'
            ) {
                return false;
            }
    
            return true;
        });
    
        return $nodes;
    });
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WordPress 6.1 remove sidebar text underline’ is closed to new replies.