-
AuthorPosts
-
July 20, 2022 at 8:44 am #1358855
Thanks for the great theme! I have a client requesting that the hovering captions over images be removed when mousing over them. Is it possible to remove this function site wide? It would be helpful to know if hovering captions can be turned off for individual images as well. Here is my client’s site: http://www.scottbyersdesign.com/portfolio/ Mouse over the images and you should a dark box with white type. Trying to turn that function off, but keep captions below the images on.
Thanks for your help you guys!
-Kris
July 20, 2022 at 9:18 am #1358867Hi Kris,
There’s no function to remove it site wide though we can use custom CSS code to hide it on the whole site.
As for turning off captions for individual images there’s also no option for that as the options target all images of the masonry element, though we can also use CSS to target it individually.Mouse over the images and you should a dark box with white type. Trying to turn that function off, but keep captions below the images on.
I’m not really sure I understand what you meant with white type? is it white title? does this mean by default images have caption below it then when hovered over a mouse will have a dark background and white title?Best regards,
NikkoJuly 20, 2022 at 10:46 am #1358878temp remove of the title tag on hovering – put this to your child-theme functions.php:
function temporary_removal_title_tags(){ ?> <script> window.onload = function() { var links = document.querySelectorAll('a, img, *[title]'); for (var i = 0; i < links.length; i++) { var link = links[i]; link.onmouseover = function() { this.setAttribute("data-tooltip", this.title); this.title = ""; }; link.onmouseout = function() { this.title = this.getAttribute("data-tooltip"); }; link.onmousedown = function() { this.title = this.getAttribute("data-tooltip"); }; } }; </script> <?php } add_action('wp_footer', 'temporary_removal_title_tags');
July 22, 2022 at 12:25 am #1359110Nikko and Guenni, thanks for your insights! -Kris
July 22, 2022 at 2:10 am #1359117Hi Kris,
You’re welcome :)
Just let us know if you need further assistance.Best regards,
NikkoJuly 29, 2022 at 9:58 pm #1359901Kriesi Team, I’m not much of a coder and could use a little hand holding. Do I just add this snippet of code to the end of the code within the functions.php (located in Appearance->Theme File Editor)? Or do I need to place it somewhere within the code specifically? Thanks for the extra help.
-Kris
July 30, 2022 at 1:01 pm #1359924Hi,
Thanks for your question, yes you would place the code at the end of your functions.php.
But I note that the site you linked to above doesn’t seem to be using a Child Theme, we would recommend that to follow the steps to install a child theme, otherwise this code that you add to the functions.php will be lost with each update.
Please give this a try, and if you need further help please include an admin login in the Private Content area so we can assist.Best regards,
MikeAugust 1, 2022 at 2:48 am #1360037Thanks Kriesi Team, I haven’t used child themes before, but I understand the principle. I think installing the theme and inserting code shouldn’t be an issue. What I’m not sure about is how to handle the the parent theme and child theme afterwards. Do I keep the child theme activated in order for the website to operate as intended? If the client wants future changes (such as text updates), do I activate the parent theme, make changes, then go back and re-activate the child theme? If you could give some guidance on how I handle the parent theme and child theme after the child theme is installed that would be very helpful. Thanks. -Kris
August 1, 2022 at 5:36 am #1360056Hi Kris,
After you have activated the child theme, and have followed the steps written in the documentation: https://kriesi.at/documentation/enfold/child-theme/ (see Install a child theme from your WordPress dashboard), you don’t need to switch back to the parent theme to make changes then go back switch again to the child theme since you are using the same database.
The child theme basically inherits everything from the parent theme and contains the extra modification you made.Best regards,
NikkoAugust 1, 2022 at 6:24 pm #1360155Kriesi Team, thanks for all the assistance with this. The hovering title captions were disabled and site appears to be functioning properly. Thank you! One quick follow up question…how are theme updates handled? Just update the theme through the child theme? Do I leave the parent theme untouched from now on? -Kris
August 1, 2022 at 6:31 pm #1360161Hi,
Thanks for the update. The updates are done just as before, simply check under Enfold->Theme Update. You should not have to do anything to your child. You should not alter any parent theme files, as they will be overwritten on updates.
Best regards,
RikardAugust 3, 2022 at 12:34 am #1360381Kriesi Team, big thank you to everyone for your guidance. Much appreciated! -Kris
August 3, 2022 at 3:42 am #1360383Hi Kris,
We’re glad that we could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Hovering (Mouse Over) Captions’ is closed to new replies.