Site logo

Archived topic

Make entire post element clickable

7 replies · Started by lerschiboi on August 7, 2021

Viewing posts 1–8 of 8

Hi,
I'm currently redesigning my category pages (previously styled with Elementor) with GenerateBlocks.

I used the content template block and chose the template "layout with borders" for all archives. But now I'm looking for a way to make the entire post element clickable and not just the headline. Is there a way to achieve this?

Here's a screenshot for clarification:

Post Grid

Hi there,

can you share a link to the site so i can take a look.

Hi David, it's on a staging site which is not public, but I'll post the details in the private section!

The easiest and more efficient method is with the GenerateBlocks Pro plugin. It has a Container Link option, that can be set to dynamically link the container to the post.

If you're not using GB Pro then you can use this CSS method:

.generate-columns-container .dynamic-content-template > .gb-container {
    position: relative;
}
.generate-columns-container .dynamic-content-template > .gb-container a:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

Thanks David! I'm not using GB Pro yet but will surely get it eventually. :)
The CSS works perfectly for now!

Now I've got some more styling to do and I also got rid of the option to make the first post featured and bigger.

Strangely, only 5 posts get displayed instead of 6 in the grid. Any idea why that is? And how do I display even more posts per page? In the customizer, I only see an option to set the number of columns but not how many posts should be displayed before it breaks up into the next page.

The number of posts displayed is set in Dashboard > Settings > Reading --> Blog pages show at most

Fantastic, thanks so much for the help!

You're welcome

This archived topic is closed to new replies.