Created
August 23, 2017 16:14
-
-
Save MatRouault/31d8cdebe0971e7732462cb501fa2133 to your computer and use it in GitHub Desktop.
Image Gallery in Post With Slideshow Effect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beans_add_attribute( 'beans_post_gallery', 'class', 'uk-slidenav-position' ); | |
beans_remove_attribute( 'beans_post_gallery', 'class', 'uk-grid uk-grid-width-small-1-3' ); | |
beans_wrap_inner_markup( 'beans_post_gallery', 'svx_gallery_container', 'ul', array( | |
'class' => 'uk-slideshow uk-overlay-active', | |
) ); | |
beans_add_attribute( 'beans_post_gallery', 'data-uk-slideshow="{height:420,autoplay:true}"', '' ); | |
beans_modify_markup( 'beans_post_gallery_item', 'li' ); | |
beans_remove_markup( 'beans_post_gallery_icon' ); | |
beans_add_attribute( 'beans_post_gallery_caption', 'class', 'uk-overlay-panel uk-overlay-background uk-overlay-bottom uk-overlay-slide-bottom' ); | |
beans_add_smart_action( 'beans_post_gallery_caption', 'class', 'uk-hidden' ); | |
function svx_add_gallery_pagination (){ | |
?> | |
<a href="" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous" data-uk-slideshow-item="previous"></a> | |
<a href="" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next" data-uk-slideshow-item="next"></a> | |
<?php | |
} | |
add_action('svx_gallery_container_after_markup','svx_add_gallery_pagination'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment