Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Post Carousel using Oxygen Builder - Kode dari tutorial https://solusipress.com/membuat-post-slider-pada-oxygen-builder-basic/
<link rel="stylesheet" href="<?php echo CT_FW_URI . '/vendor/unslider/unslider.css' ?>">
<script type="text/javascript" src="<?php echo CT_FW_URI . '/vendor/unslider/unslider-min.js' ?>"></script>
<script type="text/javascript">
(function($){
$( '.post-sliders .oxy-repeater-pages-wrap' ).remove();
<?php if( !is_admin() ): ?>
$( '.post-sliders' ).each( function(){
var the_html = $(this).html();
$(this).replaceWith( $( '<div class="the-sliders"><ul>' + the_html + '</ul></div>' ) );
});
$( '.post-slider-item' ).each( function(){
var the_html = $(this).html();
$(this).replaceWith( $( '<li>' + the_html + '</li>' ) );
});
$(function() {
$('.the-sliders').unslider();
});
<?php endif; ?>
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment