Ejemplo n.º 1
0
			<?php 
    $__count = 0;
    ?>
			<?php 
    foreach ($list_query as $key => $li) {
        ?>
				<div class="tab-pane<?php 
        echo $__count == 0 ? ' active' : '';
        ?>
" id="<?php 
        echo esc_attr($key) . '-' . $_id;
        ?>
">
					<div class="wpo-content">
							<?php 
        $loop = training_wpo_woocommerce_query($key, $number);
        if ($number == -1) {
            $_post_per_page = $loop->found_posts;
        } else {
            $_post_per_page = $number;
        }
        if ($loop->have_posts()) {
            wc_get_template('widget-products/' . $style . '.php', array('loop' => $loop, 'columns_count' => $columns_count, 'class_column' => $class_column, 'posts_per_page' => $number));
        }
        ?>
					</div>

					<?php 
        if ($style == 'grid' || $style == 'list' && $loop->found_posts > $_post_per_page) {
            ?>
						<?php 
    case '3':
        $class_column = 'col-sm-4';
        break;
    case '2':
        $class_column = 'col-sm-6';
        break;
    default:
        $class_column = 'col-sm-12';
        break;
}
$_id = training_wpo_makeid();
if ($category == '') {
    return;
}
$_count = 1;
$loop = training_wpo_woocommerce_query('', $number, $category);
if ($title != '') {
    ?>
	<h3 class="widget-title visual-title">
       <span><?php 
    echo trim($title);
    ?>
</span>
	</h3>
<?php 
}
if ($loop->have_posts()) {
    ?>
	<div class="woocommerce<?php 
    echo $el_class != '' ? ' ' . $el_class : '';
    ?>
Ejemplo n.º 3
0
/**
 * $Desc
 *
 * @version    $Id$
 * @package    wpbase
 * @author     WPOpal  Team <wpopal@gmail.com, support@wpopal.com>
 * @copyright  Copyright (C) 2015 wpopal.com. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * @website  http://www.wpopal.com
 * @support  http://www.wpopal.com/support/forum.html
 */
$atts = vc_map_get_attributes(str_replace('.php', '', basename(__FILE__)), $atts);
extract($atts);
$deals = array();
$p_deals = training_wpo_woocommerce_query('deals')->posts;
$_id = training_wpo_makeid();
$_count = 1;
switch ($columns_count) {
    case '4':
        $class_column = 'col-sm-6 col-md-3';
        break;
    case '3':
        $class_column = 'col-sm-4';
        break;
    case '2':
        $class_column = 'col-sm-6';
        break;
    default:
        $class_column = 'col-sm-12';
        break;