Elementor: Post Widget All Space / Whole Card or Box Clickable (+Popup)

Go to Dashboard > Elementor > Custom Code. And then add this code to make the whole space/box/card of the post widget to be clickable.

Note: It does not work on new posts that has been generated by ‘Load More’ or ‘Infinity Scroll’ pagination.

IMPORTANT
You have to set the post CSS Classes to post. But if you forgot and it works just fine, then it’s fine.

				
					<script>
document.addEventListener('DOMContentLoaded', function() {
jQuery(function($){
$('.post').find('.elementor-post').each(function(){
let link = $(this).find('a').attr('href');
$(this).wrapAll( document.createElement( 'a' ) );
$(this).closest('a').attr('href', link);
});
});
});
</script>


				
			

If you want the whole box to be clickable on popup as well, add this to Elementor Custom Code as well.

				
					<script>
jQuery( document ).on( 'elementor/popup/show' , function () {
	jQuery(function($){
$('.post').find('.elementor-post').each(function(){
let link = $(this).find('a').attr('href');
$(this).wrapAll( document.createElement( 'a' ) );
$(this).closest('a').attr('href', link);
});
});
});
</script>																														 
				
			

The whole box, including the excerpt is clickable. But in this case, all example posts are linked to the main site.

There is a bug when you set the featured image on the top. This one has to be on the left or right. For alternative, use Elementor Extra.