</ul>
        </div>
    <?php 
}
?>
    <div class="row zo-grid zo-grid-cause <?php 
echo esc_attr($atts['grid_class']);
?>
">
        <?php 
$posts = $atts['posts'];
while ($posts->have_posts()) {
    $posts->the_post();
    $groups = array();
    $groups[] = '"all"';
    foreach (zoGetCategoriesByPostID(get_the_ID()) as $category) {
        $groups[] = '"category-' . $category->slug . '"';
    }
    ?>
            <div class="<?php 
    echo esc_attr($atts['item_class']);
    ?>
" data-groups='[<?php 
    echo implode(',', $groups);
    ?>
]'>
                <?php 
    get_template_part('single-templates/causes/content', 'full-width');
    ?>
            </div>
        <?php 
Exemplo n.º 2
0
}
?>
    <div class="zo-carousel <?php 
echo esc_attr($atts['template']);
?>
" id="<?php 
echo esc_attr($atts['html_id']);
?>
">
        <?php 
$posts = $atts['posts'];
while ($posts->have_posts()) {
    $posts->the_post();
    $groups = array();
    $groups[] = 'zo-carousel-filter-item all';
    foreach (zoGetCategoriesByPostID(get_the_ID(), $taxonomy) as $category) {
        $groups[] = 'category-' . $category->slug;
    }
    ?>
            <div class="zo-carousel-item <?php 
    echo implode(' ', $groups);
    ?>
">
                <?php 
    if (has_post_thumbnail() && !post_password_required() && !is_attachment() && wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full', false)) {
        $class = ' has-thumbnail';
        $thumbnail = get_the_post_thumbnail(get_the_ID(), 'medium');
    } else {
        $class = ' no-image';
        $thumbnail = '<img src="' . ZO_IMAGES . 'no-image.jpg" alt="' . get_the_title() . '" />';
    }