Site logo

Archived topic

mixed font weight in header

3 replies · Started by Torsten on June 2, 2020

Viewing posts 1–4 of 4

Hi,
I would like to have the first word in the header in bold, the second in normal, defined by font weight, for now the font weight is 700, second word should be 300.
Can you help?
Thanks ahead,
Torsten

Hi there,

You would need to filter the output manually like this:

add_filter( 'generate_site_title_output', function() {
    return sprintf(
        '<%1$s class="main-title" itemprop="headline">
            <a href="%2$s" rel="home">
                <strong>First-word</strong> Second-word
            </a>
        </%1$s>',
        ( is_front_page() && is_home() ) ? 'h1' : 'p',
        esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) )
    );
} );

Let me know if you need more info :)

Thanks a lot, worked, but I installed an image logo instaed...

No problem! :)

This archived topic is closed to new replies.