Hi there.
I have been trying to figure out how to turn my side description into an H1 using PHP. I’d like to just insert a custom function or filter inside the function.php file. This should be really simple. I ran into a few snippets for this but it was specific for the site title, not description.
Also, I would like this to be only for the homepage because obviously every other page and post will have a H1 attributed to it.
Below is a copy of a snippet that I found on the forms but It needs to be modified so that it only works on the homepage and it takes the blog description and makes that into an H1 one.
Any help would be appreciated. Thank you!
add_action( ‘generate_before_main_content’, ‘generate_add_blog_title’ );
function generate_add_blog_title()
{
if ( ! is_home() )
return;
?>
<header class=”page-header”>
<h1 class=”entry-title” itemprop=”headline”>My Blog Title</h1>
</header>
<?php
}