Archived topic
Different container size for blog archives
16 replies · Started by Patricia on May 12, 2021
hi, I am not using sidebars and would like to display the latest posts on my homepage.
when I change container size on the customizer panel, it automatically changes both single and home page container sizes.
How can I make this change only for the home page?
another question is, I would like to display archive in columns but instead of having a thumbnail on top of the excerpt, I'd like to have thumbs on the left and excerpt on the right. how can I do that?
ps.: I'm using a child theme :)
Thanks a lot,
Hi there,
1. You can use a Layout Element to set a different content width:
https://docs.generatepress.com/article/layout-element-overview/
To apply it to the home page - you would set the Display Rule > Location to Front Page
2. In Customizer > Layout > Blog --> Featured Images:
https://docs.generatepress.com/article/adjusting-the-featured-images/
On the archive tab, set the Location to Above Title, the Alignment to Left and set Media Attachment size to Medium or smaller.
will try and will let you know how it worked. thank you so much for the super fast response!
oh and by the way, I have another question plese! I have been having this message from speed testing tools, do you know how to fix it?? thanks:
A large DOM will increase memory usage, cause longer style calculations, and produce costly layout reflows.
STATISTIC ELEMENT VALUE
Total DOM Elements 2,299
Maximum DOM Depth
<span class="lwptoc_item_number">
19
Maximum Child Elements
Hi Patricia,
Please open a new topic for non-related questions, thanks!
that's done thank you!
I would like to ask another thing if I display thumbnails on the left and excerpt on right, there is a way to display the latest post thumb on top and excerpt below the image, and all the rest as I said before (thumb on left excerpt right)???
thank you so much!
I would like to ask another thing if I display thumbnails on the left and excerpt on right, there is a way to display the latest post thumb on top and excerpt below the image, and all the rest as I said before (thumb on left excerpt right)???
I believe the customizer setting David provided only controls the main post list.
If you're using a plugin for your latest post listing, it shouldn't be affected and will keep its layout.
But to be sure, you can link us to the page in question to inspect things. :D
Hi dear,
Sure! I am looking for something like in this link
didn't find any tutorial on how to do it with generate press
any help will be appreciated!
Thank you so much,
Patricia.
It is possible but would require a little CSS.
Do you have the archives set up as per the instructions here ? If so share me a link and i can take a look at whats need to format the fist post in the list.
hi David, I actually changed my mind and decided to keep the same container sizes to all pages and decided to add a left sidebar.
So for this everything is somewhat resolved.
All I would like to do now is to set my loop to look like this: https://ibb.co/smnt07K
I could understand that to have my posts displaying like ( image on the left and excerpt on the right) I need to adjust the thumbs setting in the customizer.
I guess the problem now is to find out how to have the latest post featured like in this link https://ibb.co/smnt07K
were you able to open the link?
Thanks :)
If you can set your blog featured image settings as per #2 here:
https://generatepress.com/forums/topic/different-container-size-for-blog-archives/#post-1776209
Then once their set up with image left / excerpt right - send me a link to the site ill look at the CSS required to change the the latest post.
Hi David, thank you for your instructions. here is the link to the blog
thank you so much and talk soon!
Try adding this CSS:
body:not(.single) .post:first-child .inside-article .post-image {
margin-right: 0;
margin-left: 0;
float: none;
text-align: center;
}
body:not(.single) .post:first-child .inside-article .post-image img {
width: 100%;
}
Hi David,
Thank you so much the code worked well. I just need to ask your help to do a few adjustments, please!
I am gonna list here the fixes I'd need for the latest featured post:
1. The featured image got very stretched. Is there a way to fix it?
2. How Can I move the ‘read more’ button to the right? (only for this latest post)
3. And right below the ‘read more# btn, how can I leave the category links on the left and the tags on the right? (only for this latest post)
Many thanks!
Hmmm... it may be best to take a step back and we can approach this using the Block Element module and GenerateBlocks plugin.
This doc explains how to use the Block Element to design your post archives:
https://docs.generatepress.com/article/block-element-content-template/
You will find some prebuilt templates that provide you both styles.
Your going to require two Block Elements.
Create the first and select the Template > Landscape
Set the Display Rules to Blog and All Archives.
For the second Block Element select one of the other templates - this we'll apply to your First post only. See this screenshot that explains how: