예제 #1
0
        ?>
                    <h2><?php 
        _e('Nothing Found', 'sell_media');
        ?>
</h2>
                    <p><?php 
        _e('Sorry, but we couldn\'t find anything that matches your search query.', 'sell_media');
        ?>
                    <?php 
        echo do_shortcode('[sell_media_searchform]');
        ?>
                <?php 
    }
    $i = 0;
    ?>

            <?php 
}
?>
<!-- show child terms check -->

            </div><!-- .sell-media-grid-container -->
            <?php 
echo sell_media_pagination_filter($wp_query->max_num_pages);
?>
        </div><!-- #content -->
    </div><!-- #sell_media-single .sell_media -->

<?php 
do_action('sell_media_before_footer');
get_footer();
예제 #2
0
/**
 * Adds template to display all items for sale.
 *
 * @since 1.0.4
 */
function sell_media_all_items_shortcode($atts)
{
    $settings = sell_media_get_plugin_options();
    global $paged;
    if (get_query_var('paged')) {
        $paged = get_query_var('paged');
    } elseif (get_query_var('page')) {
        $paged = get_query_var('page');
    } else {
        $paged = 1;
    }
    extract(shortcode_atts(array('collection' => '', 'columns' => '3', 'show' => get_option('posts_per_page')), $atts));
    //$class = ( $columns ) ? 'sell-media-grid sell-media-grid-' . $columns : 'sell-media-grid';
    $args = array('posts_per_page' => $show, 'post_type' => 'sell_media_item', 'paged' => $paged);
    if ($collection) {
        $args = array('posts_per_page' => $show, 'taxonomy' => 'collection', 'field' => 'slug', 'term' => $collection, 'orderby' => $settings->order_by, 'paged' => $paged);
    }
    $wp_query = null;
    $wp_query = new WP_Query();
    $wp_query->query($args);
    $i = 0;
    if ($wp_query->have_posts()) {
        $html = '<div class="sell-media">';
        $html .= '<div class="sell-media-grid-container">';
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            $i++;
            $html .= apply_filters('sell_media_content_loop', get_the_id(), $i);
        }
        wp_reset_query();
        $i = 0;
        $html .= '</div><!-- .sell-media-grid-container -->';
        if (!is_front_page() && is_main_query()) {
            $html .= sell_media_pagination_filter($wp_query->max_num_pages);
        }
        $html .= '</div><!-- #sell-media-shortcode-all .sell_media -->';
    }
    return $html;
}
예제 #3
0
                    <p><?php 
        _e('Sorry, but we couldn\'t find anything that matches your search query.', 'sell_media');
        ?>
                    <?php 
        echo do_shortcode('[sell_media_searchform]');
        ?>
                <?php 
    }
    $i = 0;
    ?>

            <?php 
}
?>
<!-- show child terms check -->

            </div><!-- .sell-media-grid-container -->
            <?php 
if (!is_wp_error($terms)) {
    $pages = ceil($c / get_option('posts_per_page '));
} else {
    $pages = $wp_query->max_num_pages;
}
echo sell_media_pagination_filter($pages);
?>
        </div><!-- #content -->
    </div><!-- #sell_media-single .sell_media -->

<?php 
do_action('sell_media_before_footer');
get_footer();