Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1017776

    Hello Team,

    This is a reoccurring issue (#978817) which was previously solved by Mike.
    The code line Read More… is used in several pages such as:

    http://ilanwittenberg.com/faces-of-jerusalem
    http://ilanwittenberg.com/tunnel-beach-dunedin/

    I am not sure what caused the code to break, perhaps an update to Enfold. Mike successfully resolved the problem by adding the code below to functions.php:

    /*wp_enqueue_script( 'avia-popup',  $template_url.'/wp-content/themes/enfold-child/js/jquery.magnific-popup.js', array('jquery'), 2, true);*/
    
    wp_register_script( 'custom-js', $template_url.'/wp-content/themes/enfold-child/js/custom-js.js', 'jquery', "1", true);
    
    wp_enqueue_script( 'custom-js' );
    
    function gallery_more_info(){
    ?>
    <script>
    jQuery(window).load(function(){
      jQuery('.gallery-more-info-link').magnificPopup({
        type:'inline',
        midClick: true
      });
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'gallery_more_info');

    Happy to grant admin rights if required.
    Please advise,
    ofekw

    #1018559

    Hey ofekw,
    Sorry for the late reply, I see your page has the error

    jQuery is not defined

    Please try disabling your plugins to be sure it’s not a conflict, if that doesn’t help please include a admin login in the private content area so we can take a closer look.
    I suspect that the jQuery is not loading in the head like it needs to.

    Best regards,
    Mike

    #1018568

    Hello Mike,
    Thanks for following up.
    Disabled Autoptimize plugin (optimises website’s performance: JS, CSS, HTML, images, Google Fonts, etc) and that solved the issue.
    Is there an alternative optimising plugin that you can recommend testing?
    Regards,
    ofek

    #1018570

    Hi,
    That’s good news, try using it without minifying js, that’s what typically breaks jQuery
    I believe there is a setting to disable js minifying.

    Best regards,
    Mike

    #1018574

    Hello Mike,
    Here are Autoptimize JavaScript Options:
    Optimise JavaScript Code?
    Aggregate JS-files?
    [Aggregate all linked JS-files to have them loaded non-render blocking? If this option is off, the individual JS-files will remain in place but will be minified.]
    Also aggregate inline JS?
    [Let Autoptimize also extract JS from the HTML. Warning: this can make Autoptimize’s cache size grow quickly, so only enable this if you know what you’re doing.]
    Force JavaScript in <head>?
    [Load JavaScript early, this can potentially fix some JS-errors, but makes the JS render blocking.]
    Exclude scripts from Autoptimize:
    [s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,seal.js, A comma-separated list of scripts you want to exclude from being optimised, for example ‘whatever.js, another.js’ (without the quotes) to exclude those scripts from being aggregated by Autoptimize.]
    Add try-catch wrapping?
    [If your scripts break because of a JS-error, you might want to try this.]

    Enabled Force JavaScript in <head> ; and that solved the issue but disabled the transition from the home page slider to the portfolio!

    Should I try excluding a script? What is the script name? (Tried more-info,gallery-more-info-link,gallery_more_info without success).

    Thanks,
    ofekw

    • This reply was modified 5 years, 9 months ago by ofekw.
    #1018583

    Hi,
    Please try to not “Optimise JavaScript Code” I take this as the same as minifying
    Enfold combines all of it’s JS into a single file dynamically depending on the elements used.
    Please see our post on this.

    If you are done creating your site and are ready to make it as fast as it can be, then please read this post

    Best regards,
    Mike

    #1018587

    Thanks Mike!
    Much appreciated support,
    ofekw

    #1018659

    Hi,
    Glad to help, unless there is anything else we can help with on this issue, shall we close this then?

    Best regards,
    Mike

    #1018696

    Hello Mike

    Yes, Issue resolved and have implemented most of the optimisation tips.

    Kind regards,

    ofekw

    #1018699

    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 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Lightbox Popup fails’ is closed to new replies.