Tagged: image overlay
On the category page generated automatically for the custom post type “Portfolio Items”, I’m seeing an alignment issue with the “image-overlay overlay-type-external” when I hover on any of the images.
I’m seeing this issue at https://libbiemark.com/artworks/1960s/. I have provided these screenshots:
In the first, you can see the hover state only appears over the top portion of the image:
https://drive.google.com/file/d/16M-TseQhrTgN4r80EhDiQEB9XeSGWSp0/view?usp=sharing
In the second, I”m showing how that image-overlay is “stuck” above the image.
https://drive.google.com/file/d/1BYkm9Zx5jV1DN8lB9q22mbqYTeXb0aIS/view?usp=sharing
The styles for “image-overlay overlay-type-extern” appear to be inline. I don’t believe I’ve introduced any css that is altering this.
Lastly, if I re-enter the image area, THEN the image-overlay aligns correctly:
https://drive.google.com/file/d/17eRA_cLr9kE9SeA9_GWZ1czNcBjmQRBD/view?usp=sharing
Thank you for any assistance.
Hey milkrow,
Thank you for the inquiry.
Try to add this script in the function.php file to correct the overlay issue:
add_action( 'wp_footer', function() { ?>
<script type="text/javascript">
(function($) {
$('.grid-image').trigger('mouseover');
})(jQuery);
</script>
<?php }, 9999 );
Best regards,
Ismael
Hi Ismael,
Thank you for your response. Should I be adding that to the child or the parent theme’s function.php?
