This thread is resolved. Here is a description of the problem and solution.
Problem:
The customer is experiencing an issue on their portfolio page where the hover image is not displaying correctly. Instead of appearing over the tile-image-logo on hover, it appears below it. The images were added using image blocks with dynamic sources and dynamic links, and custom CSS was applied to create a hover effect.
Solution:
We suggested using a different approach for implementing the hover effect in WordPress, given that the example provided by the customer used a different page builder. We provided a demo created with Toolset to illustrate a similar hover effect using two custom fields for the images. The solution involved using specific CSS classes (front-image and back-image) to control the visibility of the images on hover. The CSS was applied directly to the page using an HTML block to achieve the desired effect:
In the output of the View the back image is added first and the front image second (so the front image will cover the back image).
Please note that for this hover effect to work, the CSS targets the front image using a specific class ('front-image'), which you need to add in the View settings (please check the screenshot bellow).
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
On the portfolio page, the hover-image is not displaying on hover, instead it is displaying below the tile-image-logo. The images have been added using image blocks with dynamic sources and dynamic links.
I've added this CSS to the global editor:
.wp-block-image .hover-link {
position: relative;
display: inline-block;
}
As swapping out images on hover isn't something directly supported with the Image block I can see that you are having to create your own solution, but I can't tell what exactly you are doing from the CSS alone. I can see while hovering the images on the test site you linked to that the image links are broken, but I don't know what settings you are using.
Would it be possible to get access to your site so that I can check how you have done this?
Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.
Thank you for providing access to your site. I've checked the portfolio page and reviewed the setup, but I'm still unable to determine exactly how the hover image solution is implemented. Could you please provide more details on this? Specifically, is this functionality achieved through custom JavaScript, or is it a feature provided by a specific theme or plugin? Understanding this will help us better diagnose the issue and offer the appropriate solution.
Thank you for your cooperation, and I look forward to your response.
Thanks for your response and the additional details. Given that the example you provided is not from a WordPress site but from a different page builder, a different implementation is necessary for WordPress.
My colleague created a demo to illustrate a similar hover effect using Toolset. You can check it here: hidden link.
This demo uses two custom fields for the images and applies this CSS directly to the page using an HTML block:
In the demo, the post type has two custom fields, front-image and back-image. The View outputs both of them for each loop item in a grid.
In the output of the View the back image is added first and the front image second (so the front image will cover the back image).
Please note that for this hover effect to work, the CSS targets the front image using a specific class ('front-image'), which you need to add in the View settings (please check the screenshot).
Login link: hidden link
Feel free to inspect the demo using the login link above and let us know if you have any questions!
I debugged this so far but I wasn't able to find a solution.
I'd like to ask permission to make a copy/staging version of your site where I can debug this closely without affecting the live site.
I'll make sure to delete this copy as soon as we get this issue fixed.
I'm afraid of debugging directly on the live site and cause issues to your visitors. Also, it is important to test a different setup as part of the troubleshooting.
I have escalated this ticket to our 2nd tier of support where our 2nd tier specialists will take a deeper look at this issue and will try to find a solution.
I will get back to you as soon as I get an answer from them.
Thank you for the update! The on-hover image is functioning, however, the on-hover image (text with button) is displayed first and should appear when hovering over the logo image. Can you please swap the way these two images are set up? Also, one of the images is not displaying, can you resolve this? Thank you!
To fix the order of the images I edited the view and changed the name of the first and second custom image field in the loop.
The missing image is due to the fact that the Post itself has a custom image field missing or incorrectly set up. Eg.: The portfolio entry Engage: hidden link You'll notice that the hover image point to a link that doesn't exist.
Regarding the carousel, you're right, the CSS ended up targeting more than needed for that specific page, so I made a small adjustment to make it select only the hover images: