Archived topic
Custom width for posts, only posts
3 replies · Started by Mihail on April 3, 2022
Hello, everyone!
I want to change the width of the record content (only records)! To do this, I apply the following code:
.single .site.grid-container {
max-width: 800px;
}
This works, but there's a problem. In this case the width also changes for products. And I need this width ONLY for posts.
Please help me.


Here is a test site:
http://lafarm.hostenko.net/v-ukra%d1%97ni-zyavivsya-pershij-nft-muzej-vijni/
http://lafarm.hostenko.net/product/testovij-tovar/
Hi there,
if you want to use the CSS then change it to:
.single-post .site.grid-container {
max-width: 800px;
}
OR the alternative is to use a Layout Element to set the Content Width:
https://docs.generatepress.com/article/layout-element-overview/
You can set its Display Rules to Posts > All Posts.
I solved the problem by creating a container with dynamic content (entry post) and making it the right width.

Glad to hear you found a solution you're happy with.