Link site-description to url
-
The original /inc/template-tags.php file has following function:
function twentytwenty_site_description( $display = true ) { $description = get_bloginfo( 'description' ); if ( ! $description ) { return; } $wrapper = '<div class="site-description">%s</div><!-- .site-description -->'; $html = sprintf( $wrapper, esc_html( $description ) ); $html = apply_filters( 'twentytwenty_site_description', $html, $description, $wrapper ); if ( ! $display ) { return $html; } echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }
To link tagline (site-description) to home url, I changed the 6th line to:
$wrapper = '<a class="site-description" href="/">%s</a><!-- .site-description -->';
Of course it’s not the correct way. Can someone please publish the code that need to be put in Child Theme function.php file?
Thank you.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Link site-description to url’ is closed to new replies.