Tagged: ,

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #978817

    Hello Team,

    Many of my portfolio items contain a hyperlink to open a text box:
    <strong><a class="gallery-more-info-link" href="#more-info">Read More...</a></strong>

    The style.css contains the following code:

    /* More info lightbox */
    #more-info {
      max-width: 1024px;
      margin: 0 auto;
      padding: 30px;
      background: white;
    }
    #more-info div{
      margin:20px 0;
    }
    #more-info button.mfp-close{
      position: absolute;
      top: -50px !important;
      right: -50px !important;
      background-color:white !important;
    }
    .mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
        width: initial;
        max-width: 1024px;
        margin: 60px;
    }

    A Code Block on each lightbox page starts with the following code:
    <div id="more-info" class="gallery-more-info mfp-hide">….

    Unfortunately with the recent update to enfold 4.4.1 this code fails to open the popup text box – see links in Private Content box.
    Please advise.
    Thanks,
    ofekw

    #978819

    if you have updated from an older Version before 4.2.2. and are you working with a child-theme? – one reason could be – if you have a child header.php ? maybe it is not the newest one – so update that to 4.4.1 too. You know the reason for child-theme header.php on your setting than – to edit it in the same way.

    #978825

    Hello Guenni007,

    Thanks for the prompt reply. Yes, I have Enfold Child: Theme Header (header.php)
    Not sure what you mean by updating it to 4.4.1 too. How can I update header.php to a new version?
    Also, what do you mean by “edit it in the same way”?

    Thanks for your support,
    ofek

    #978928

    why do you have a header.php in child-theme.
    On default it is not necessary. So there must be a reason for that. You have to remember why. Often it is because of inserting an extra div or something like that.
    Since Enfold 4.2.2 there is a different header.php in enfold. A lot of users who are updating from that older version to 4.4.1 have the same problem with lightbox. So copy a new header.php from the enfold 4.4.1 folder to your child-theme folder and see if the lightbox troubles are gone.
    Then you have to know why you got a child-theme header.php so that you can transfer the old changes to the new copy

    #979140

    Hi Guenni007,

    Thanks for following up. The file header.php is the same at Enfold and enfold-child so copying it from Enfold mad no difference. Here is the code:

    <?php
    	if ( ! defined('ABSPATH') ){ die(); }
    	
    	global $avia_config;
    	
    	$lightbox_option = avia_get_option( 'lightbox_active' );
    	$avia_config['use_standard_lightbox'] = empty( $lightbox_option ) || ( 'lightbox_active' == $lightbox_option ) ? 'lightbox_active' : 'disabled';
    	/**
    	 * Allow to overwrite the option setting for using the standard lightbox
    	 * Make sure to return 'disabled' to deactivate the standard lightbox - all checks are done against this string
    	 * 
    	 * @added_by Günter
    	 * @since 4.2.6
    	 * @param string $use_standard_lightbox				'lightbox_active' | 'disabled'
    	 * @return string									'lightbox_active' | 'disabled'
    	 */
    	$avia_config['use_standard_lightbox'] = apply_filters( 'avf_use_standard_lightbox', $avia_config['use_standard_lightbox'] );
    
    	$style 					= $avia_config['box_class'];
    	$responsive				= avia_get_option('responsive_active') != "disabled" ? "responsive" : "fixed_layout";
    	$blank 					= isset($avia_config['template']) ? $avia_config['template'] : "";	
    	$av_lightbox			= $avia_config['use_standard_lightbox'] != "disabled" ? 'av-default-lightbox' : 'av-custom-lightbox';
    	$preloader				= avia_get_option('preloader') == "preloader" ? 'av-preloader-active av-preloader-enabled' : 'av-preloader-disabled';
    	$sidebar_styling 		= avia_get_option('sidebar_styling');
    	$filterable_classes 	= avia_header_class_filter( avia_header_class_string() );
    	$av_classes_manually	= "av-no-preview"; /*required for live previews*/
    	$av_classes_manually   .= avia_is_burger_menu() ? " html_burger_menu_active" : " html_text_menu_active";
    	
    	/**
    	 * @since 4.2.3 we support columns in rtl order (before they were ltr only). To be backward comp. with old sites use this filter.
    	 */
    	$rtl_support			= 'yes' == apply_filters( 'avf_rtl_column_support', 'yes' ) ? ' rtl_columns ' : '';
    	
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?> class="<?php echo "html_{$style} ".$responsive." ".$preloader." ".$av_lightbox." ".$filterable_classes." ".$av_classes_manually ?> ">
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <?php
    /*
     * outputs a rel=follow or nofollow tag to circumvent google duplicate content for archives
     * located in framework/php/function-set-avia-frontend.php
     */
     if (function_exists('avia_set_follow')) { echo avia_set_follow(); }
    
    ?>
    
    <!-- mobile setting -->
    <?php
    
    if( strpos($responsive, 'responsive') !== false ) echo '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">';
    ?>
    
    <!-- Scripts/CSS and wp_head hook -->
    <?php
    /* Always have wp_head() just before the closing </head>
     * tag of your theme, or you will break many plugins, which
     * generally use this hook to add elements to <head> such

    Would you like admin rights?
    Thanks,
    ofekw

    #979397

    so if they are identical why do you have one on child-theme ?

    by the way this is only part of header.php isn’t it?

    this is missing on comparison to 4.4.1.

    wp_head();
    
    ?>
    
    </head>
    
    <body id="top" <?php body_class( $rtl_support . $style." ".$avia_config['font_stack']." ".$blank." ".$sidebar_styling); avia_markup_helper(array('context' => 'body')); ?>>
    
    	<?php 
    	
    	do_action( 'ava_after_body_opening_tag' );
    		
    	if("av-preloader-active av-preloader-enabled" === $preloader)
    	{
    		echo avia_preload_screen(); 
    	}
    		
    	?>
    
    	<div id='wrap_all'>
    
    	<?php 
    	if(!$blank) //blank templates dont display header nor footer
    	{ 
    		 //fetch the template file that holds the main menu, located in includes/helper-menu-main.php
             get_template_part( 'includes/helper', 'main-menu' );
    
    	} ?>
    		
    	<div id='main' class='all_colors' data-scroll-offset='<?php echo avia_header_setting('header_scroll_offset'); ?>'>
    
    	<?php 
    		
    		if(isset($avia_config['temp_logo_container'])) echo $avia_config['temp_logo_container'];
    		do_action('ava_after_main_container'); 
    		
    	?>
    
    #979401

    but to shorten this – save your child-theme header.php on your desktop device ( Mac , PC etc)

    erase that child-theme header.php – erase all cached datas (browser cache , enfold merged files ) then and look if your lightbox troubles are gone – if not it must be something else.

    #979480

    Hello Guenni007,

    Removed header.php in enfold-child and cleared cache. Unfortunately, that made no difference.

    Perhaps there is a work around? Is there a simple way to create a popup on top of the Lightbox grid?

    Thanks,
    ofekw

    #979615

    Hi,
    I have taken a look and found that you have a js error:

    magnificPopup is not a function at /wp-content/themes/enfold-child/js/custom-js.js

    so it seems that your custom script in your child theme is conflicting with the magnificPopup
    Please try removing the the custom script to see if that solves.

    Best regards,
    Mike

    #979648

    Hello Mike,

    Thanks for your support. Removing /enfold-child/js/custom-js.js disables the transition capability from the home page to the portfolio gallery when users click the mouse.

    Please advise,
    ofekw

    #979803

    Hi,
    Can you please include a admin login in the private content area so we can take a closer look.

    Best regards,
    Mike

    #979805

    Thanks Mike,

    Credentials in Private Content section.

    Cheers,

    ofekw

    #979815

    Hi,
    Thanks for the login, I moved the “gallery more info” script out of your custom.js and created a function for it in your functions.php
    Now it is not giving any errors, and your other scripts in custom.js are also working.
    Please clear your browser cache a couple of times, and check.

    Best regards,
    Mike

    #979916

    Thanks Mike,

    Very much appreciated!

    ofekw

    #979927

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 15 posts - 1 through 15 (of 15 total)

The topic ‘Lightbox Popup fails’ is closed to new replies.