Site logo

Archived topic

Archive pages Image size & Changing Margin/Padding of content area

8 replies · Started by Sandip Dedhia on July 20, 2022

Viewing posts 1–9 of 9

I have two queries, I recently started setting our blog theme on Generatepress, for this I have selected Volume child theme from site library, now the first issue I am facing is, despite setting image width and height in post archive template, I still see random image size for feature images on homepage.

Reference images,
Image Size
Image size issue

My second query is how do we go about changing margin/padding of the content area, I meant to ask whats the best solution to do that.

margin padding

Thanks.

Hi there,

the image sizes won't crop and squeeze your image proportions.
If the height is the issue, then just define the height.

IF you want to 'crop' the image then it will require some CSS.

Can i see the site ? And i can look at your second issue to.

It is possible to have any other solution than CSS, as I understand correct CSS solution will still load whole image and will affect the site loading speed.

For resizing the images, you have three options:

1. Replace the image
This is the best option

2. Use CSS to resize it.
This if you don't set attachment sizes can lead to the browser loading a large image.

3. Register a new image size in WP that crops them all to the size you require.
This method means you add another img file to your database for every Image on your site. And you will need to force just that image to load, so no src-set sizing.

Options 2 and 3 don't give you any control over the positioning of those images. So for some images it may look fine, for others it may not.

Heres the CSS method, so you can see what 2 or 3 will do:

.generate-columns-container .dynamic-featured-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

Adjust the aspect ratio to suit.

The spacing, you can reduce the Padding or Spacing in Customizer > Layout > Container.

Thanks a lot David,

Few more things,

1. How to add numbered pagination (1,2,3..,100,101) on home/category/author pages.
2. How can we show posts from selected category on homepage
3. How to show Related posts on single post pages.

Can you raise a new topic for each unrelated question.
It will allow us to resolve this one, and it will make it easier for you and others to find the answers in the future

Will do it, Thank you!

You're welcome

This archived topic is closed to new replies.