Archived topic
Increase content width when adding sidebar form
8 replies · Started by Scott on December 15, 2022
Hey – having the same issue as this thread with my site. Trying to add a newsletter sign up form to the right sidebar, but when I do and increase the right sidebar width to around 30-35%, the content gets really tight and squished.
I do not see the code you mentioned:
.single-post #page {
margin-left: auto;
margin-right: auto;
max-width: 960px;
}
I’m using READ from the site library.
Thanks!
Ideally it would be great to have a layout such as Nomadic Matt's where the content is somewhat left aligned and the newsletter is on the right, without so much padding/margin on the sides of the page. https://www.nomadicmatt.com/travel-blogs/where-to-stay-dublin/
Hi Scott,
Can you try adding this instead?:
body.single-post div#content {
max-width: 1100px;
}
You can also try creating a Layout Element to change the Content Width: https://docs.generatepress.com/article/layout-element-overview/#content-1
Basically, you need to increase the content width to a higher value to make it similar to your reference site. For reference, your reference site has a max-width of 1100px on single posts. Yours is currently just 800px.
Amazing! Thanks, Fernando - I appreciate it. I used the Layout Element, and it worked great. Marking as resolved.
You're welcome, Scott!
Hey Fernando, looks like it's actually not fully working. It's working within WP Admin preview, but if I visit the site not logged in to WP admin or visit via Incognito, the changes are not showing. I've cleared the website cache, done a hard refresh within the browser, etc. Any ideas? Images, links and the URL are attached in the private info.
Hi there,
if i load the site and disable WP Rocket on the front end by adding the : ?nowprocket query string to the URL, then it displays correctly ie. i see what you see when logged in ( correct ).
So its somewhere in WP Rockets settings thats the issue
Thanks! Was able to resolve by fixing some CSS rules within WP Rocket.
Glad to hear that!