[Resolved] Changing the display name of Headings in Appearance ▸ Customize

Home Forums Support [Resolved] Changing the display name of Headings in Appearance ▸ Customize

Home Forums Support Changing the display name of Headings in Appearance ▸ Customize

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1239211
    Forrest

    Hi there,

    I was wondering if there is a way to change how the heading display name appears in Appearance ▸ Customizing ▸ Typography ▸ Headings.

    The default is set H1-H6, but I am wanting to change the H6 to display as “Byline” or “Caption”.

    There will be various people publishing content on the site so I wanted to make it uniform and easy for them.

    Thanks in advance!

    #1239321
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could try this:

    add_filter( 'gettext', function( $text ) {
        if ( 'Heading 6 (H6)' === $text ) {
            $text = 'Your new text';
        }
    
        if ( 'Heading 5 (H5)' === $text ) {
            $text = 'Your new text';
        }
    
        // etc..
    
        return $text;
    } );

    Let me know if you need more info 🙂

    #1239563
    Forrest

    Thanks so much for the quick response.

    That worked like a charm!

    #1240526
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

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