-
AuthorPosts
-
September 16, 2014 at 4:16 am #319558
The “Sign In” and “Sign Up” links on the top right of our website no longer open in a lightbox after our server was upgraded to WP 4.0 and Enfold 2.9.2. I have already followed your directions in other forum posts such as disabling all plugins & rebuilding cache, neither of which has worked. I also tried changing rel=”lightbox” to “prettyPhoto” to no avail. Please help me solve ASAP! Secondly the old lightbox plugin allowed me to pass the lightbox dimensions (e.g., height and width) in the query string. Is this still possible? Can you provide a link with examples? Thank you!!!
September 16, 2014 at 9:02 am #319666Hey akircher!
Thank you for using the Enfold theme.
The latest version of the theme uses a new kind of lightbox called MagnificPopUp. If you still want to use the prettyPhoto plugin, please disable the Lightbox Modal Window on Enfold > Theme Options. Install this plugin: https://wordpress.org/plugins/prettyphoto/
Best regards,
IsmaelSeptember 16, 2014 at 2:02 pm #319840That is my plan B for right now, but would love to use the same modal code as Enfold in order to avoid a redudant plugin. Anyway I can get my code to work with Magnific PopUp?
September 17, 2014 at 10:08 pm #320762Hi!
Have you tried passing iframe=true to the links?
Best regards,
JosueSeptember 18, 2014 at 2:42 am #320829Yes you can see the “Sign Up” link is /join?iframe=true&width=1400. Just in case the query string was messing things up I also tried removing the query string all togther in the “Sign In” link which is just /login. Both links have rel=”lightbox”. Please look at the live url in the original private message to see the problem for yourself.
September 18, 2014 at 3:40 am #320841Hey!
Your avia.js file seems to be outdated, try re-uploading that file or the whole /js file via FTP.
Regards,
JosueSeptember 18, 2014 at 4:47 am #320853Thanks Josue, I appreciate your help with this! Unfortunately that didn’t work
I think my avia.js was up to date (2.9.2). I re-uploaded via FTP just to make sure, but the lightboxes are still broken.
Here is the file just to make sure we are looking at the same thing: /wp-content/themes/enfold/js/avia.js?ver=2September 18, 2014 at 4:50 am #320857Hi,
Open avia.js and look for this lines:
autolinkElements: 'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"]', videoElements : 'a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"]',
Replace them by this:
autolinkElements: 'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href*=".jpg?"], a[href*=".png?"], a[href*=".gif?"], a[href*=".jpeg?"], a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]', videoElements : 'a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]',
Regards,
JosueSeptember 18, 2014 at 4:56 am #320860Changed, but still broken :-(
September 18, 2014 at 5:05 am #320863Hi!
Can you hand me a FTP account or a WordPress administrator account?
Best regards,
JosueSeptember 18, 2014 at 6:01 am #320901This reply has been marked as private.September 18, 2014 at 7:02 am #320917Hi,
Try adding this at the very end of your theme functions.php file:
function add_custom_script(){ ?> <script> (function($) { $(window).load(function() { $('a[href*="iframe=true"]').magnificPopup({ disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); }); })( jQuery ); </script> <?php } add_action('wp_footer', 'add_custom_script');
Regards,
JosueSeptember 18, 2014 at 7:12 am #320922Thanks Josue! That worked. Since I assume this custom function is not going to be added enfold, I cheated and added the <script> part to the Google Analytics Tracking code, so that I can overwrite all the Enfold files when I upgrade. Thanks again, Enfold support is truly world class!!!
September 18, 2014 at 7:23 am #320933You are welcome :)
Note: you can also use this plugin to store custom functions as a plugin.
Regards,
Josue -
AuthorPosts
- The topic ‘Lightbox Broken in WP 4.0 on production site’ is closed to new replies.