Site URL: https://www.affa-action.org/equality-tracker-legislative-scorecard
Version 7.1
I'm using the custom code below to try and get a blog post featured images to link to external source URLs (and not the blog post page).
I found this code in the forum and added it through Code Injection > Footer. It fixed the links on some images, but not all. Any idea what's going on here? I tried turning off the link to source URL on impacted posts and turning it back on. Tried removing the URL and adding it back in, it's not fixing the issue on these specific posts. It's impacting 26 out of 46 posts on the page.
Examples of posts that are working: Alexander, Bennett, Cash
Examples of posts that are not working: Adams, Allen, Campsen
Code I used:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(".blog-basic-grid .blog-basic-grid--container").click(function(){
window.location=$(this).find(".blog-title a").attr("href");
return false;
});
</script>