-
AuthorPosts
-
January 3, 2019 at 11:24 am #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’);January 4, 2019 at 5:24 am #1049798Hey 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,
IsmaelJanuary 4, 2019 at 12:36 pm #1049962Thank 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
EvaJanuary 5, 2019 at 7:17 am #1050237Hi 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,
RikardJanuary 5, 2019 at 11:32 am #1050291Hi Rikard,
we use the custom footer page. Is this a problem?
Thank you for your efforts.best regards
EvaJanuary 7, 2019 at 1:50 pm #1050874January 7, 2019 at 1:53 pm #1050875Hi Ismael,
it works fine.
Thank you. You’re the best :-)Best regards
EvaJanuary 7, 2019 at 3:34 pm #1050920 -
AuthorPosts
- The topic ‘subline horizontal gallery’ is closed to new replies.