[Support request] Turn side description into H1

Home Forums Support [Support request] Turn side description into H1

Home Forums Support Turn side description into H1

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2354601
    Yerain

    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
    }

    #2354667
    Fernando
    Customer Support

    Hi Yerain,

    For reference and clarification, can you provide the link and point us where this side description is?

    You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

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