Archived topic
Title width
3 replies · Started by Tomasz on December 17, 2020
Hi,
How can I make a title post (only) width the same as a post (content) width?
I'm using the below element but I don't know how to wrap up a title with html? In a mobile mode it's OK but in desktop it's too width - example provided.
<h1 style="color:#000000;" style="text-align:center;">{{post_title}}</h1>
<h6 style="font-size:12px;">[wpseo_breadcrumb]</h6>
Thank you,
Tomasz
Hi Tomasz,
Try the following steps:
1. Remove the page hero for single post.
2. Follow this article to add breadcrumb:
https://docs.generatepress.com/article/adding-breadcrumbs/#using-hooks-element
Replace generate_before_entry_title with generate_after_entry_title in step 3 of the article.
3. If you want the post titles centered, add this css:
.single-post .entry-title {
text-align: center;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
Hi Ying,
It works.
Thank you.
Tomasz
You are welcome :)