Tagged: enfold
I want both the title and the excerpt to be clickable in the portfolio grid:
wordpress.friesianconnection.com/sale-horses/
How would I got about doing that?
Hey Andrea!
Please refer to my post here – https://kriesi.at/support/topic/portfolio-text-field-link-possible/#post-384492
Regards,
Yigit
Hi Yigit,
Using this code works great:
function add_custom_div(){
?>
<script>
jQuery(“.grid-content”).click(function(){
window.location = jQuery(this).find(“a:first”).attr(“href”);
return false;
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_div’);
However, I wanted the portfolio to open as AJAX on the page
Hi!
Which of the enfold layout you want to copy as functionality?
Best regards,
Basilis
Hi Basilis,
I’m using the Portfolio Grid Content Element – I want each section to open using AJAX. Before if you clicked the title it would do that, but the problem was that it was only the title that was clickable versus the entire thing. Now everything is clickable but the AJAX functionality went away.
Hi guys,
Any insight into having the entire portfolio grid clickable AND have it open on the page with AJAX instead of on a new page?
Best!
Hi!
For clarification, you want to open the AJAX box when the excerpt is clicked. Is that correct? Maybe, this will work:
function ava_trigger_isotope(){
?>
<script>
jQuery('#top .isotope-item').find('.grid-content').on('click', function() {
jQuery(this).prev('.grid-image').trigger("click");
});
</script>
<?php
}
add_action('wp_footer', 'ava_trigger_isotope');
Best regards,
Ismael
That works perfectly! Thank you!