Site logo

Archived topic

Remove (Not Hide) Post Title In Archive / Home - To Display Only Featured Images

17 replies · Started by Jose on August 23, 2019

Viewing posts 1–15 of 18

Hey I'm trying to remove the post title and remove the whitespace under the featured image... for archive / blog page → https://eqor.is/IUAU6J

Okay, what would be ideal is to remove the whitespace, and have the title fit as an overlay on the featured image/thumbnail. We run a food blog, so pictures are the main thing....

Decided not to remove the titles, but keep them like in https://wplift.com/ - but how do you fix the image size, and reduce the spacing?

Unfortunately, its being setup on MAMP before we test it live.

Tom,

I think I used this code before on Genesis, would this work on GP?

function be_remove_post_title_in_grid() {
	if( ! apply_filters( 'is_genesis_grid_loop', false ) )
		return;	
	if( in_array( 'teaser', get_post_class() ) ) {
		remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
	    add_action( 'genesis_entry_content', 'genesis_do_post_title' );
	}
	
}
add_action( 'genesis_before_entry', 'be_remove_post_title_in_grid' );

Hi Leo, I tried setting the height to 600 and width to auto, but there seems to be some problem with alignment... if the height is the same, shouldnt GP automatically resize width? please see https://eqor.is/WauChY

Hmm, that should in theory as long as the resizer is working. Is there any way for us to actually see the site?

Does it work if you define a width as well?

Any chance you can clear and disable all caching plugins and image lazy load plugins first?

I think the issue here is that when 600px is set to be the height, the (auto) widths of the images combined together is larger than the container width of 1030px.

What if you set the height to be smaller like 400px? do the images line up correctly?

Let me know :)

Also, on mobile with a lower height than 600, the image is much smaller, creating more white space... https://eqor.is/wu6PmY

Are you able to upload the featured images so they are all the same size to start with?

That's generally what I would recommend. Then you don't have to deal with the cropping/resizing issue.

Let me know :)

Leo, we have over 500 posts... that's not going to be a solution for us.

What if you do something like this?:

.post-image img {
    width: 100%;
}

@media (min-width: 769px) {
    .post-image img {
        height: 400px;
        object-fit: cover;
    }
}

Thanks Tom! That seems to have done the trick... https://eqor.is/lrtTPc

On a tablet view however, there is a lot whitespace around the image... https://eqor.is/UZVgxw I believe this is from the post container, how do you make that fit the image and center align?

This archived topic is closed to new replies.