Tagged: enfold blog
Hello,
While adding blog post widget from enfold template only the image and title is clickable, to redirect us to specific post.
What I can do, to make full article tag as a link to blog post?
Hey Global4Net,
Thank you for the inquiry.
Are you referring to the Blog Posts element? Please provide a link to the page so that we can check the element.
Best regards,
Ismael
In the private content section I’ve pasted the link.
Please check for example sections DZIELIMY SIĘ WIEDZĄ or I AKTUALNOŚCIAMI almost at the bottom.
Hi,
Thank you for the info.
To apply the same link to the full article or item, please add this script in the functions.php file.
// blog posts link
function ava_custom_script_blog_link()
{
?>
<script type="text/javascript">
(function($) {
$('.rt-tpg-container.blog-posts .rt-grid-item').on('click', function(e) {
e.preventDefault();
var title = $(this).find('.entry-title a');
var link = title.attr('href');
window.location.href = link;
});
})(jQuery);
</script>
<?php
}
add_action( 'wp_footer', 'ava_custom_script_blog_link', 9999 );
And add this css code to switch the cursor to a pointer when hovering the article.
.rt-tpg-container.blog-posts .rt-grid-item {
cursor: pointer;
}
Best regards,
Ismael