Site logo

Archived topic

Tagline is not appearing

6 replies · Started by Kamal on August 25, 2022

Viewing posts 1–7 of 7

On my website the tag line is not showing up.
I have already unchecked 'Hide site tagline' in the site identity customization.
Please help.

Thanks & Regards,
Kamal

Hi Kamal,

The site tagline is removed by default when this option is activated as there typically isn’t enough space for it. However, you can add it back in using this PHP snippet:

add_filter( 'generate_site_title_output', function( $output ) {
    $tagline = '<div class="site-description">Your tagline here</div>';

    return $output . $tagline;
} );

Adding PHP reference: https://docs.generatepress.com/article/adding-php/#code-snippets

hello Fernando,

Thanks a lot. Got the site-tag after adding the snippet. Is there any risk involved with using code snippet plugin?

Also, I also would like to show the site-description only on desktop when the browser width is greater than 600px.

Thanks & Regards,
Kamal

I achieved using the following css.

@media screen and (max-width: 720px) {
    div.site-description {
        display: none !important;
    }
}

Please let me know if any improvement is needed in this snippet.

Thanks & Regards,
Kamal

Hi there,

that CSS is absolutely fine - no improvements required .

Hi David,

Thanks for the feedback. Sure I am extremally happy with the customer support.

I will submit my reviews to WordPress.

Regards,
Kamal

You’re welcome Kamal!

This archived topic is closed to new replies.