Archived topic
Use an archive layout on home page that is different than blog archive pages
10 replies · Started by Penny on March 9, 2019
How can I use one archive layout on the home page and a different one for all the blog archive pages?
Hi there
you can use a filter to change the layout options:
https://docs.generatepress.com/article/option_generate_blog_settings/
Thanks so much David!
Using the filter, I've got the homepage layout just the way I want it.
For some reason, the images are huge, showing full size. How do I adjust the size for the home page only?
Can you link us to the site? You can edit your original topic and use the Site URL field for privacy.
Yes, I edited the original to add the URL.
With a bit of CSS to resize them down to thumbnail width like so:
.home .inside-article .post-image img {
max-width: 240px; /* Current thumbnail width */
}
David,
I tried this CSS and it affected the image sizes on all archive pages, not just the home page. How can I adjust that?
hmmm... i am not seeing that change, the archives are already set to a smaller size in columns. That CSS specifically targets the home page. Can you check with and without the CSS?
Kind of strange. The CSS does affect the width of images on other archive pages, but only in the Dashboard, not on the live site.
Any ideas?
When changes work in the backend but not live site, it's usually a caching issue.
Make sure to disable or flush any caching plugin or server cache you might have.