Site logo

Archived topic

Header Element

3 replies · Started by Praveen on July 4, 2020

Viewing posts 1–4 of 4

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

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;
    }
}

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?

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.

This archived topic is closed to new replies.