[Resolved] Underline link in WordPress editor

Home Forums Support [Resolved] Underline link in WordPress editor

Home Forums Support Underline link in WordPress editor

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2290844
    William

    Hello –

    I am not using a child theme. Is there a way to get the underlines of my hyperlinks to show up on the backend inside the WordPress editor?

    Thank you.

    #2291194
    David
    Staff
    Customer Support

    Hi there,

    with the Code Snippets plugin, try adding this snippet:

    add_filter( 'block_editor_settings_all', function( $editor_settings ) {
    	$css = '.wp-block a {
            text-decoration: underline;
            text-underline-offset: 5px;
            text-decoration-thickness: 2px;
            text-decoration-color: #101010;
            font-weight: 700;
        }';
    
    	$editor_settings['styles'][] = array( 'css' => $css );
    
    	return $editor_settings;
    } ); 
    #2291480
    William

    Hi David –

    Thanks very much for the help here. I installed the code snippets plugin and added that function. Unfortunately, still no underline on the backend.

    Here is my code for the hyperlinks if that’s helpful:

    .entry-content p a,
    .entry-content h2 a,
    .entry-content h3 a{
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
    text-decoration-color: #101010;
    font-weight: 700;
    }

    #2291548
    David
    Staff
    Customer Support
    #2291575
    William

    David thank you so much! Stellar support as always.

    #2291845
    David
    Staff
    Customer Support

    Glad to be of help!

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