Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Adjust post container width without affecting homepage

  • 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

  • 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?

  • 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?

  • 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;
    }
  • 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;
    }
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.