admin管理员组文章数量:1386806
I want to show post's uploaded images but it doesn't show... What am I doing wrong?
$gallery = array();
if ( function_exists('fw_get_db_post_option') ) {
$gallery = fw_get_db_post_option( $post->ID, 'gallery', true );
}
if( !empty( $gallery ) ) { ?>
<div class="tg-innerbannerholder">
<div id="tg-innerbannerslider" class="tg-innerbannerslider tg-ad-gallery owl-carousel" data-pswp-uid="1">
<?php
foreach( $gallery as $key => $value ) {
$thumb = listingo_prepare_image_source($value['attachment_id'],480,380);
?>
<figure class="item" itemprop="associatedMedia" itemscope itemtype="">
<a class="spv-ag-gallery" href="<?php echo esc_url( $value['url'] ); ?>" data-rel="prettyPhoto[gallery]">
<img src="<?php echo esc_url( $thumb ); ?>" alt="<?php echo esc_attr( get_the_title( $value['attachment_id'] ) ); ?>">
</a>
</figure>
<?php } ?>
</div>
<?php
$script = "
jQuery(document).ready(function(){
jQuery('#tg-innerbannerslider').owlCarousel({
items:4,
nav:false,
margin:0,
loop:true,
dots:false,
center: true,
autoplay:false,
rtl: ".listingo_owl_rtl_check().",
smartSpeed:450,
responsive:{
0:{items:1,},
992:{items:2,},
1200:{items:4,}
},
navClass: ['tg-btnprev', 'tg-btnnext'],
navContainerClass: 'tg-innerbannerbtns',
navText: [
'<span><i class=\"lnr lnr-chevron-left\"></i></span>',
'<span><i class=\"lnr lnr-chevron-right\"></i></span>',
],
});
});";
wp_add_inline_script('listingo_callbacks', $script, 'after');
?>
</div>
<?php } ?>
本文标签: Unyson Framework doesn39t show gallery images
版权声明:本文标题:Unyson Framework doesn't show gallery images 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744539872a2611543.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论