-
irenegnaw54
Hi there, is there a way to reduce a single post’s container width without it affecting the homepage container?
Secondly, just so I know all my options, is there a way to only adjust the width of the text that comes after the feature image on a single post?
Screenshot: https://postimg.cc/y3HHRJby
-
Alvind
Hi there,
The easiest way is to use custom CSS. To reduce the single post content container width, you can set a new max-width value like this:
body.single-post .inside-article { max-width: 800px; }
For the text width, do you want this applied only to the first paragraph after the featured image or all paragraphs?
-
irenegnaw54
Thank you Alvind! Yes I’d like to try only applying to everything that comes after the feature image
-
Can I see a post on your site?
-
irenegnaw54
-
1. You are adding the feautred image manually to each of the posts; is that intended? As GP can add the featured image automatically.
2. Try this CSS:
.single-post .entry-content > *:not(.wp-block-post-featured-image) { max-width: 400px; margin-inline: auto; display: block; }
-
irenegnaw54
Yeah unfortunately we already have over 100s of posts where feature image has been added manually prior to switching to GeneratePress so we’re stuck with this for now 🙁
That worked! Thank you so much!
-
I see, that’s too bad 🙁
Would you like to use CSS to hide the manually added feature image for the exsiting posts, then enable the GP defualt featured image, so from now on, you don’t have to manully do that again?
If so, here’s the CSS:
.single-post .wp-block-post-featured-image { display: none; }
and then change this CSS to this:
body.single-post .entry-content { max-width: 800px; }
- You must be logged in to reply to this topic.