How to center post titles on homepage
-
Hi there!
I’m using the Rosalie theme with a static homepage, and in the “latest on the blog” section all of the text is left aligned and it looks pretty awkward sometimes (also the font is huge and doesn’t change with I change the general font settings in the customizer). Does anyone know how to center this/fix this?
Thank you! (sorry if this has been asked before, I tried searching and didn’t see it)
The blog I need help with is: (visible only to logged in users)
-
Hi there :)
Did you try to change from an h2 heading tag to a smaller style like h3 or h4?
If you prefer it’s also possible to reduce the heading font with CSS customization, add this to your custom CSS:
@media only screen and (min-width: 782px)
.wpnbha.ts-3 article .entry-title {
font-size: 1em;
}You can change the font-size to bigger (1.1em, 1.15em …) or smaller (0.95em, 0.9em, 0.85em …) until it looks nice to you.
If you want to center the text in your paragraph tags, add this your custom CSS:
.wpnbha.is-grid>div {
text-align: center;
}
.wpnbha.ts-3 article .entry-meta {
justify-content: center;
}If you prefer to justify your content, add this instead:
.wpnbha.is-grid>div {
text-align: justify;
}
.wpnbha.ts-3 article .entry-meta {
justify-content: center;
}Sometimes you may need a hard refresh to see the style changes because your browser caches this type of information to be faster.
So I usually recommend adding a clear cache extension to your browser tab.I hope this helps! Let me know if you need further help.
-
Hi thanks for your advice!!
I’m not exactly sure what it means to change from an h2 heading to h3 or h4…sorry I’m pretty new at this…where would you find that option?
In the customizer it just has 2 buttons under header that says regular or small, but when I change it it doesn’t do anything to the title’s of the posts.
I’ll try the css though! If I can, I don’t have the business plan
-
Hi again :)
I’m sorry, my fault!
If you are using the new block editor, check these instructions:
https://wordpress.com/support/wordpress-editor/
The editor automates a search engine optimized layout by considering the page title is the <h1> tag, so subsequent Heading blocks begin at <h2> and so on, but you can choose your heading level according to your style in the toolbar or the block settings.
The Heading block offers the following options in its toolbar:
– H2, H3, and H4 heading tags
– Bold
– Italics
– Hyperlink
– Strikethrough
– More OptionsPlease see the original documentation about the Heading Block here:
https://wordpress.com/support/wordpress-editor/blocks/heading-block/
To change the heading style in the classic editor, check these instructions:
https://wordpress.com/support/visual-editor/
The style drop-down menu allows you to change the formatting of any selected text. This includes various headings and other pre-defined styles built into your theme.
Let me know if you could fix it ;)
- The topic ‘How to center post titles on homepage’ is closed to new replies.