Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1049570

    Hi,
    I have inserted the code in the child theme from the thread #1016668. It does not work, except in the customizer. There can I see the captions. Can you help me?
    What is wrong?
    Or is it possible to realize that with CSS like this: content: attr(title); ?

    <?php

    /*
    * Add your own functions here. You can also copy some of the theme functions into this file.
    * WordPress will use those functions instead of the original functions then.
    */

    function horizontal_gallery_subline(){
    ?>
    <script>
    (function($){
    $(window).load(function() {
    $(‘.av-horizontal-gallery-link’).css(‘bottom’, ’30px’);
    $(‘.av-horizontal-gallery-img’).each(function(){
    var imgTitle = $(this).attr(‘title’);
    $(this).after(‘<p class=”text-under-image”>’ + imgTitle + ‘</p>’);
    $(this).css({
    ‘padding-bottom’ : ’20px’,
    ‘background-color’ : ‘transparent’,
    });
    $(‘.text-under-image’).css({
    “text-align”: “center”,
    “margin”: “-20px 0”,
    “color”: “#ffffff”,
    });
    });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘horizontal_gallery_subline’);

    #1049798

    Hey evabo,

    Thank you for using Enfold.

    There is an error in the console saying that “jQuery is not defined”. Did you load jQuery in the footer? Please edit this line:

    add_action(‘wp_footer’, ‘horizontal_gallery_subline’);
    

    .. set the priority to 100:

    add_action(‘wp_footer’, ‘horizontal_gallery_subline’, 100);
    

    Best regards,
    Ismael

    #1049962

    Thank you Ismael,
    we change the line but it does’nt work.
    What do you mean by that load jQuery in the footer? I don’t have a clue of it!
    Can you help me?

    Best regards
    Eva

    #1050237

    Hi Eva,

    There is an option to load jQuery in the footer under Enfold->Performance. Please check if that option is checked. If you should need any further help then please post admin login details in private.

    Best regards,
    Rikard

    #1050291

    Hi Rikard,
    we use the custom footer page. Is this a problem?
    Thank you for your efforts.

    best regards
    Eva

    #1050874

    Hi,

    I modified the code a bit. It is working properly now.

    Best regards,
    Ismael

    #1050875

    Hi Ismael,
    it works fine.
    Thank you. You’re the best :-)

    Best regards
    Eva

    #1050920

    Hi,

    Awesome! Glad we could help. Have a nice day. :)

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘subline horizontal gallery’ is closed to new replies.