[Support request] Header Element

Home Forums Support Header Element

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1351321
    prakshah

    Hi ,

    I have added a header element with the following code ->

    <header class="entry-header">
    				<h1 class="entry-title" itemprop="headline">{{post_title}}</h1>	
    	
    	
    
    <div class="hero-meta">
    	<p style="font-size:14px">Updated on {{post_date}} by {{post_author}} </p>
    </div>

    But I want to accomplish a few more things ->
    1) Remove the link from author-name
    2) Add author avatar
    3) Use the “Post title” H1 font size and not the normal h1

    #1351767
    David
    Staff
    Customer Support

    Hi there,

    1. This article provides the filter to remove the hero author link:

    https://docs.generatepress.com/article/generate_page_hero_post_author/#example

    2. This example provides the code for adding an avatar shortcode:

    https://docs.generatepress.com/article/page-hero-examples/#example-2

    3. Try using this HTML

    <h1 class="entry-title">{{post_title}}</h1>

    or you can use your own CSS:

    /* Desktop  Hero H1 */
    .page-hero h1 {
        font-size: 32px;
    }
    /* Mobile  Hero H1 */
    @media(max-width: 768px)  {
        .page-hero h1 {
            font-size: 24px;
        }
    }
    #1378796
    prakshah

    Thank you. Do you have any idea if there are SEO implications of using this – <h1 class=”entry-title”>{{post_title}}</h1>

    or this – <h1>{{post_title}}</h1>

    One is entry-title and the other is post-title?

    #1378942
    David
    Staff
    Customer Support

    No SEO implications.
    The Single Content Title (H1) has its own Customizer > Typography controls. The entry-title is just a CSS class that is used to apply those styles.

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