Tagged: ,

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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!!!

    #319666

    Hey 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,
    Ismael

    #319840

    That 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?

    #320762

    Hi!

    Have you tried passing iframe=true to the links?

    http://kriesi.at?iframe=true

    Best regards,
    Josue

    #320829

    Yes 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.

    #320841

    Hey!

    Your avia.js file seems to be outdated, try re-uploading that file or the whole /js file via FTP.

    Regards,
    Josue

    #320853

    Thanks 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=2

    #320857

    Hi,

    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,
    Josue

    #320860

    Changed, but still broken :-(

    #320863

    Hi!

    Can you hand me a FTP account or a WordPress administrator account?

    Best regards,
    Josue

    #320901
    This reply has been marked as private.
    #320917

    Hi,

    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,
    Josue

    #320922

    Thanks 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!!!

    #320933

    You are welcome :)

    Note: you can also use this plugin to store custom functions as a plugin.

    Regards,
    Josue

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Lightbox Broken in WP 4.0 on production site’ is closed to new replies.