• Hi,

    I have a blog posts page, there a blogroll all posts one by one

    How can I add to this page, an H1 title?

    This page cannot be edited on the “pages”

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there,

    you can use a PHP Snippet like this to hook in your own title:

    add_action('generate_before_main_content', function(){
        if ( is_home() ) {
            ?>
            <div class="grid-container">
                <h1 class="entry-title">Your Blog page title</h1>
            </div>
            <?php
        }
    });
    Thread Starter biznext

    (@biznext)

    Thank you ??

    You’re welcome

    Thread Starter biznext

    (@biznext)

    I see the title is close to the menu and a bit outside the content.

    Can you tell me which classes or CSS I need to add, to show this title like the title of category pages?

    Can you share a link to your site ?

    Thread Starter biznext

    (@biznext)

    I did it,
    I changed to:

    add_action('generate_before_main_content', function(){
        if ( is_home() ) {
            ?>
            <header class="page-header" aria-label="Page">
                <h1 class="entry-title">Your Blog page title</h1>
            </header>
            <?php
        }
    });

    [Of course, I changed the “Your Blog page title”]
    Thanks

    • This reply was modified 2 years, 9 months ago by biznext. Reason: Thanks

    Glad to hear that!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘The tag is missing on the blog/posts page’ is closed to new replies.