[Resolved] [Feature Request] Custom page wrapper width

Home Forums Support [Feature Request] Custom page wrapper width

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #949160
    George

    Sometimes I find myself wanting to create certain landing pages that need to have a narrower page wrapper width than the main wrapper container set in the Customizer.

    I am aware of the fact that you can create two hooks as described in the article here and selecting the necessary before, after elements, in my case before_main_content and after_main_content to constrain the page width accordingly with CSS. The other solution would be applying CSS directly on page ID. This creates two additional hooks, though and could prove not so maintainable.

    An easier solution would be to have a setting per page/post where a custom page width could be set in px, %, em or vw units. Just wondering if that would be easy to implement?

    Thank you!

    #949166
    Leo
    Staff
    Customer Support

    Hi there,

    Just to make sure, this isn’t what you are looking for?
    https://docs.generatepress.com/article/layout-element-overview/#content-1

    That generally works for most users.

    If not then we would need to go with the CSS route. Not sure exactly what you are trying to do but shouldn’t need to involve hook unless you are wrapping the entire page.

    Any chance you can link me to the site in question so I can provide the best suggestion?

    Let me know 🙂

    #949211
    George

    Hi Leo, yes the layout element as you mention is what I am talking about, hadn’t noticed that. Just a wrapper for the page content, not the whole site wrapper. Just thought, it would be a good idea to have that per page/post but the actual element could work better, actually. I just wished there were other units to choose from apart from px and also some kind of responsive option so that it would only be applied to certain devices/widths.

    No big deal, I guess the different units could be added in a future update if Tom agrees?

    #949322
    Leo
    Staff
    Customer Support

    Yeah adding unit is in our consideration but the request really hasn’t come up a lot so we’ve been providing CSS solution if it is needed.

    Let me know if you want to give that a shot 🙂

    #949323
    George

    No, I am sorted, just mentioned that as a possible improvement. Thanks, Leo!

    #949327
    Leo
    Staff
    Customer Support

    No problem 🙂

    Thanks for the suggestions as always!

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