Tagged: custom link, gallery
-
AuthorPosts
-
June 1, 2022 at 4:55 pm #1353779
Hey,
I created a tab section, which can be controlled through the navigation or through images in the gallery (custom link).
This has worked flawlessly so far, after the WordPress 6 update the custom links in the gallery no longer work in the second language (Italian).
Please support, thank you!Best regards,
SoltnerJune 2, 2022 at 7:26 am #1353856Hey soltner,
Thank you for the inquiry.
Did you try resetting the gallery’s Advanced > Link Settings > Image Link to the second option (Use custom link)? Default is set to lightbox linking.
Best regards,
IsmaelJune 3, 2022 at 8:45 am #1353986Hey Ismael,
Thanks for the feedback.
Yes, i used the same setting (with adjusted urls) for Italian, but it only works in German.
A problem with wpml?Best regards,
SoltnerJune 4, 2022 at 2:46 am #1354088Hi,
Thank you for the inquiry.
Where did you place the scrollToTab script or function? We checked the functions.php file in the child theme but we didn’t find the function there.
Best regards,
IsmaelJune 7, 2022 at 8:25 am #1354353Hi Ismael,
I added the following script/function to a code module below the gallery – see screenshot
<script>
(function($) {
function scrollToTab(s, e,) {
$(s).on(e, function(event) {
var anchor, loc, cur, hash, tab, parent, pos;if( e == ‘load’ ) {
loc = window.location.hash;
hash = loc;
} else {
loc = $(this).attr(‘href’);
hash = loc.substring(loc.indexOf(‘#’));
}tab = $(‘.av-section-tab-title[href=’+ hash +’]’);
parent = tab.parents(‘.av-tab-section-outer-container’);
pos = parent.offset();tab.trigger(‘click’);
if(hash) {
setTimeout( function() {
$(window).scrollTop( pos.top – 100 )
}, 1000 );
}
});
}scrollToTab( ‘.menu-item a’, ‘click’ );
scrollToTab( window, ‘load’ );
})(jQuery);
</script>best regards,
SoltnerJune 9, 2022 at 2:17 pm #1354660Hi Ismael!
i put the code from here in the functions.php – now works!
Thank you very much for your help :-)
best regards,
SoltnerJune 10, 2022 at 2:41 am #1354741 -
AuthorPosts
- The topic ‘Gallery custom link’ is closed to new replies.