Exemplo n.º 1
0
<?php

if (!defined('ABSPATH')) {
    die('No direct access allowed');
}
TMM_Functions::enqueue_script('mixitup');
if (!$posts_per_page) {
    $posts_per_page = 10;
}
$cats_query_array = array();
if (!empty($cat_id)) {
    $cats_query_array[] = array('taxonomy' => 'folio_category', 'field' => 'term_taxonomy_id', 'terms' => array($cat_id));
}
$folio_page = 1;
if (isset($_GET['folio_page'])) {
    $folio_page = $_GET['folio_page'];
}
global $post;
$current_page_id = $post->ID;
$args = array('tax_query' => $cats_query_array, 'post_type' => TMM_Portfolio::$slug, 'posts_per_page' => $posts_per_page, 'paged' => $folio_page);
$w_query = new WP_Query();
$query = $w_query->query($args);
$folio_cat = array();
$posts_cat = array();
foreach ($query as $p) {
    $terms = wp_get_post_terms($p->ID, 'folio_category');
    foreach ($terms as $cat_object) {
        $folio_cat[$cat_object->term_id] = $cat_object;
        $posts_cat[$p->ID][] = $cat_object;
    }
}
Exemplo n.º 2
0
                        echo '<div class="entry-image">';
                        echo do_shortcode('[tmm_video type="vimeo" width="' . $video_width . '" height="' . $video_height . '"]' . $source_url . '[/tmm_video]');
                        echo '</div>';
                        break;
                    default:
                        break;
                }
            }
            ?>
			<?php 
            break;
        case 'quote':
            echo do_shortcode('[blockquote]' . $post_type_values[$post_pod_type] . '[/blockquote]');
            break;
        case 'gallery':
            TMM_Functions::enqueue_script('cycle');
            $gall = $post_type_values[$post_pod_type];
            ?>

			<?php 
            if (!empty($gall)) {
                ?>

			<div class="entry-image">
				
				<div class="image-slider">
					
					<ul>
						<?php 
                foreach ($gall as $key => $source_url) {
                    ?>