?> </h3> <a href="<?php echo esc_url(get_permalink($launcher_page_link)); ?> " class="more"><?php echo $launcher_text_link; ?> </a> </div> <div class="launcher"> <?php $args = array('post_type' => 'cp_launcher', 'posts_per_page' => $launcher_num, 'tax_query' => array(array('taxonomy' => 'launcher_category', 'field' => 'term_id', 'terms' => array($launcher_taxonomy_id)))); ?> <?php wpsp_get_posts_type('cp_launcher', $args, $launcher_num); ?> </div> <!-- .launcher --> </div> <!-- #tv-show-wrap --> <div id="photo-wrap" class="clearfix"> <div class="section-title clearfix"> <h3><i class="fa fa-picture-o"></i> <?php echo $radio_photo_title; ?> </h3> <a href="<?php echo esc_url(get_permalink($radio_photo_page_link)); ?> " class="more"><?php echo $radio_photo_text_link;
/** * Post shortcode * * Options: Show post format by category * */ function wpsp_post_shortcode($atts, $content = null) { ob_start(); extract(shortcode_atts(array('term_id' => null, 'post_format' => null, 'post_num' => null, 'cols' => null), $atts)); $args = array('tax_query' => array('relation' => 'AND', array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array($post_format)), array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => array($term_id))), 'posts_per_page' => $post_num); wpsp_get_posts_type('post', $args, $cols); return ob_get_clean(); }
/** * Launcher shortcode * * Options: Show all launcher / by Category * */ function wpsp_launcher_shortcode($atts, $content = null) { ob_start(); extract(shortcode_atts(array('term_id' => null, 'post_num' => null, 'cols' => null), $atts)); $args = array(); if ($term_id == '-1') { wpsp_get_posts_type('cp_launcher', $args, $cols); } else { $args = array('tax_query' => array(array('taxonomy' => 'launcher_category', 'field' => 'id', 'terms' => array($term_id))), 'posts_per_page' => $post_num); wpsp_get_posts_type('cp_launcher', $args, $cols); } return ob_get_clean(); }