By using Elementorforum.com’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

How can I put a link to the whole box instead of just the title and the image? (Blog post element)

arbron

arbron

New Member
How can I put a link to the whole box instead of just the title and the image?
In this case I am using a normal blog post linked to web pages as an element.
 

Attachments

  • example.JPG
    example.JPG
    32.7 KB · Views: 221
busfizz.nl

busfizz.nl

New Member
This is not available in standard Elementor Pro. It can however be easily be achieved with a third party plugin.
 
arbron

arbron

New Member
thanks for the plugin. Unfortunately this is not what I was looking for. I need a method to make the blog article that has its own link already set clickable in the whole box.
 
busfizz.nl

busfizz.nl

New Member
To make a dynamic post card (box) clickable do as follows:

1. Name the blog post widget under CSS-Classes ( you find this in the advanced tab) to 'yourname'.


1.jpg



2. Add a query by means of the HTML code widget to the page


2.jpg



3. Copy and past the following code in the HTML code widget:

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

3.jpg
Source
 
Last edited:
Dayghost

Dayghost

New Member
It works like a charm, but... Now the cards don't have equal height as before adding the script. Any work arounds for that?
 

Latest Resources

Other Elementor Resources

elementor official
Top