[Resolved] Different width only single post

Home Forums Support [Resolved] Different width only single post

Home Forums Support Different width only single post

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #380964
    Esteban

    Good morning friends!

    I ask for your help to solving this problem:

    I have a website with this homepage: https://oficientes.com/
    And this blog: https://oficientes.com/blog/

    It’s all OK with that sections, but I want to change the width of the individual entry, without affecting the width of the header in the other two sections.

    My goal is to achieve something like this: https://www.arturogarcia.com/cuanto-cuesta-web-hecha-con-wordpress/

    I have looked for other examples such as this article: https://generatepress.com/forums/topic/different-width-for-blog-page-and-single-post-page/

    But the width of the head and navigation sections is always changed, and I don’t want that.

    Thank you very much for your help! (and sorry for mi bad english!)

    #381058
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Here’s the CSS Arturo uses:

    .type-post {
        max-width: 860px;
        margin: auto;
        margin: 0px auto 60px auto;
        padding-bottom: 40px;
    }

    Let me know if you need more info πŸ™‚

    #381141
    Esteban

    Dear Tom,

    It worked perfectly! I tried to do it but couldn’t find the correct CSS instruction.

    Thank you very much!

    #381268
    Tom
    Lead Developer
    Lead Developer

    You’re very welcome πŸ™‚

    #393886
    Anderson Ojope

    Hello, Tom!

    I included the above code but it is also changing the static pages, file pages and categories.

    I want to change only the single post pages.

    What should I do?

    #393887
    Anderson Ojope
    #393942
    Leo
    Staff
    Customer Support

    Are you wanting to change the overall container width (including header, navigation footer etc) for the single posts? Or just the content area?

    #394240
    Anderson Ojope

    Only part of the content and only the unique posts.

    Stages page, files, and so on, remain the default width of the theme.

    #394243
    Leo
    Staff
    Customer Support

    Try this:

    .single .site.grid-container {
        max-width: 900px;
    }
    #394251
    Anderson Ojope

    Thanks!

    #394290
    Leo
    Staff
    Customer Support

    No problem!

    #410169
    Lewis

    Yeah I also needed to do this today.

    It seems like something that should be part of the customizer. Any plans to add it, or any reasons you wont?

    For those of us that don’t use a sidebar on our site, the container width is usually too wide for the content. It’s not ideal.

    #410265
    Leo
    Staff
    Customer Support

    I’ve only seen this request for like 3 times.

    if you don’t use the sidebar at all, then you can adjust the container width for the entire site to be smaller?
    https://docs.generatepress.com/article/container-width/

    #410433
    Lewis

    Really? I’ve had this issue with almost every site I’ve built with GP.

    Changing the container also pulls in the logo and nav. Ideally need a separate control for the content area.

    Also, if you have sidebars on your archive pages and not on your single posts, it just makes the blog content difficult to read. For some layouts, it just doesn’t make sense to have a single, global site width.

    #410701
    Leo
    Staff
    Customer Support

    The header can already adjusted to be within the container or full width separately: https://docs.generatepress.com/article/header-layout/

    Thanks for the suggestion. We will definitely consider it for sure πŸ™‚

    Let me know if you need some CSS solution for now.

Viewing 15 posts - 1 through 15 (of 25 total)
  • You must be logged in to reply to this topic.