On my case studies page – https://balrajt13.sg-host.com/case-studies/ – I am using the Portfolio Grid element with excerpt in my entries. The excerpt has some details text with a read more button
page – https://balrajt13.sg-host.com/case-studies/
screenshot – https://ibb.co/5vZWwxz
Thanks in advance
Hey navindesigns,
Thank you for the inquiry.
You can add this script in the functions.php file to adjust the height of grid content based on tallest item.
// adjust grid height
function ava_custom_script_grid_height()
{
?>
<script type="text/javascript">
(function($) {
function adjustGridHeight() {
var maxHeight = -1;
$('.grid-sort-container').each(function() {
var content = $(this).find('.grid-content');
content.css('height', 'auto');
maxHeight = maxHeight > content.height() ? maxHeight : content.height();
content.height(maxHeight + 20);
});
}
$(window).on('debouncedresize', function() {
adjustGridHeight();
});
})(jQuery);
</script>
<?php
}
add_action( 'wp_footer', 'ava_custom_script_grid_height', 9999 );
Then add this css code to align the read more buttons at the bottom of the grid content container.
.excerptReadMore {
position: absolute;
bottom: 20px;
}
.grid-content {
padding-bottom: 70px;
}
Best regards,
Ismael
This is perfect
Thanks as always
Hi,
Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike