Tagged: image titles, Lightbox
-
AuthorPosts
-
February 2, 2018 at 8:55 pm #907041
I would like to disable the Enfold lightbox for Envira galleries. Please advise how I can do this.
February 3, 2018 at 11:57 pm #907331Hey tlscaliti,
I am afraid you’ll need to contact the plugin author for more info about the issue. Making third-party plugins compatible with the theme is unfortunately beyond the support scope we offer. Sorry for that!Best regards,
BasilisFebruary 4, 2018 at 7:13 pm #907571Hi Basilis,
Thank you for getting back to me. I realize making third-party plugins compatible with Enfold is beyond support scope. I’ve already communicated with Envira and they indicated that disabling Enfold’s lightbox function would resolve the issue.So my question is: how can I disable the lightbox function in Enfold?
February 4, 2018 at 9:40 pm #907585Enfold theme options –> No Lightbox Modal Window
You can also Try the “noLightbox” css class….
Hope that helps.
February 5, 2018 at 5:37 am #907714Hi,
Thanks for helping out @goldengate415, did you try that out and did you have any luck with it @tlscaliti?
Best regards,
RikardFebruary 5, 2018 at 3:26 pm #908035Thank you goldengate415 for your suggestion.
Turns out I prefer Enfold’s lightbox, so I disabled the plugin’s version instead. The only challenge in doing this is that the captions are not displayed in the lightbox (for the plugin gallery). This isn’t the case when I use Enfold’s masonry gallery. Any thoughts or suggestions to correct this?
February 5, 2018 at 3:33 pm #908041Also, how do I prevent the image title from displaying in the lightbox?
February 5, 2018 at 3:53 pm #908053Hi tlscaliti,
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
.mfp-bottom-bar { display: none; }
If you need further assistance please let us know.
Best regards,
VictoriaFebruary 5, 2018 at 6:18 pm #908133Victoria,
Thanks for explaining how to prevent the image title from displaying in the lightbox.
1) Would you happen to know how I can get the image titles from displaying on a page (see link in private content)?
2) How can I get captions to display in the lightbox (see link in private content)?tlscaliti
February 6, 2018 at 12:37 pm #908526Hi tlscaliti,
Here is a thread for you to consider
https://wordpress.stackexchange.com/questions/6135/remove-title-attribute-from-imagesBest regards,
VictoriaFebruary 6, 2018 at 7:26 pm #908732Victoria,
Thank you for sharing the link for removing image titles. One of the suggestions – using an Img Title Removal plugin – is no longer available. I’m not sure how to set up a Content Filter (another suggestion) or where to input Javascript coding (third suggestion). Please provide further explanation on content filters and javascript so I may try these options.Also, would you please address the second part of my question – how can I get captions to display in the lightbox?
tlscaliti
February 7, 2018 at 10:33 am #908997Hi tlscaliti,
Here is the code you can put in your funtions.php to tremove titles
function remove_img_titles(){ ?> <script> jQuery(document).ready(function($) { $('img[title]').each(function() { $(this).removeAttr('title'); }); }); </script> <?php } add_action('wp_footer', 'remove_img_titles');
Can you please specify on which page you want the captions in lightbox?
If you need further assistance please let us know.
Best regards,
VictoriaFebruary 7, 2018 at 5:14 pm #909303Victoria,
Thank you for your response. I input the code into the functions.php file to remove image titles. This message displayed:
– Your PHP code changes were rolled back due to an error on line 9 of file wp-content/themes/enfold/functions.php. Please fix and try
saving again. syntax error, unexpected ‘}’
When I deleted the code to revert to the original function php file this message displayed:
– Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file
change by some other means, such as by using SFTP.
However, everything seems to be working fine in the system.Please advise how to fix this so that titles will not display when hovering over an image.
Regarding the page in which I would like to have captions in the lightbox, see the link in private content .
tlscaliti
February 8, 2018 at 3:22 am #909536Hi,
Thank you for the update.
We tried to add the script but we got the same error. Please post the FTP details in the private field so that we can access the file server. You can also ask your hosting provider.
Best regards,
IsmaelFebruary 8, 2018 at 3:53 am #909546Ismael,
Thank you for trying to add the script. Access to the file server is given in the Private Content.I would appreciate it if you would also answer two earlier questions posed as part of this thread. They are:
– How do I display captions in the lightbox?
– How do I disable the lightbox (for a specific page)?Lastly, I’ve been in regular contact with the hosting provider, who has provided limited help with my concerns.
tlscaliti
February 9, 2018 at 3:34 am #910083Hi,
Thank you for the info. We added the code in the functions.php file.
add_action('wp_footer', 'ava_custom_script'); function ava_custom_script(){ ?> <script type="text/javascript"> (function($) { function a() { $('img[title], .av-masonry-entry').each(function() { $(this).attr('title', ''); }); } $(window).on('load', function() { a(); }); })(jQuery); </script> <?php } add_filter( 'body_class', function( $classes ) { if(is_page(array(89))) { $classes = array_merge( $classes, array( 'noLightbox' ) ); } return $classes; });
1.) The title attribute is the caption so you won’t see the caption if you remove the title.
2.) We also added the body_class filter, just replace the value 89 with the id of the page where you want the lightbox disabled.
Best regards,
IsmaelFebruary 21, 2018 at 5:08 pm #915560Ismael, Victoria, Rikard and Basilis,
Thank you all for your help regarding the lightbox and image titles. I appreciate your responsiveness and perseverance to find a workable resolution for my concerns.
Regards,
tlscaliti
February 21, 2018 at 8:48 pm #915691Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)Best regards,
Basilis -
AuthorPosts
- The topic ‘How to Disable the Lightbox’ is closed to new replies.