-
Author
-
December 10, 2013 at 01:04 #8027krecikmParticipant
How I can use/edit shortcode ‘kleo_posts_carousel’ for display custom post type?
December 10, 2013 at 12:21 #8064krecikmParticipantI did it – works but it’s not be good idea?
COPY CODE$args = array( 'post_type' => 'dzieci', 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => $terms_query ); $latestPosts = new WP_Query(apply_filters('kleo_posts_carousel_args',$args)); while ($latestPosts-> have_posts()) :$latestPosts-> the_post(); switch (get_post_format()) { default: $output .= '<li>'; if (get_post_thumbnail_id()) { $output .= '<div class=""><a href="'. get_permalink().'">'; $output .= '<span class="read"><i class="icon-'.apply_filters('kleo_img_rounded_icon','heart').'"></i></span>'; $output .= get_the_post_thumbnail(null,'blog_carousel'); $output .= '</a></div>'; } $output .= '<h4>'.get_the_title().'</h4>'; $output .= '<p>'. word_trim(get_the_excerpt(), 15, '...').'</p>'; $output .= '<p><a href="'. get_permalink() .'"><i class="icon-angle-right"></i> '.__("ZOBACZ", 'kleo_framework').'</a></p>'; $output .= '</li>'; break; } endwhile; $output .= '</ul></div><!--end carousel-stories-->'. '</div>'; return $output;
December 11, 2013 at 13:48 #8103AbeKeymasterHi, You don;t need to edit the shortcode code if you don’t want to extend its functionality.
You just change the shortcode in your editor like:
[kleo_posts_carousel post_types=dzieci]Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.