5ответ(ов) в теме
Не знаю насколько все правильно, но у меня сработало. Может кому пригодится:
//слайдер вниз
remove_filter( 'the_content', 'rcl_post_gallery', 10 );
add_filter('the_content','my_gallery_down' , 10);
function my_gallery_down($content){
global $post;
if(get_post_meta($post->ID, 'recall_slider', 1)!=1||!is_single()||$post->post_type=='products') return $content;
$args = array(
'post_parent' => $post->ID,
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => 'any',
'post_mime_type'=> 'image'
);
$childrens = get_children($args);
if( $childrens ){
$attach_ids = array();
foreach((array) $childrens as $children ){
$attach_ids[] = $children->ID;
}
$my_gallery_down = rcl_get_image_gallery(array(
'id' => 'rcl-post-gallery-'.$post->ID,
'center_align' => true,
'attach_ids' => $attach_ids,
//'width' => 500,
'height' => 350,
'slides' => array(
'slide' => 'large',
'full' => 'large'
),
'navigator' => array(
'thumbnails' => array(
'width' => 50,
'height' => 50,
'arrows' => true
)
)
)) ;
}
return $content.$my_gallery_down ;
}
Тема закрыта. Публикация новых сообщений запрещена.