Servicios
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up
<?php | |
/** | |
* Result Count | |
* | |
* Shows text: Showing x - x of x results. | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/result-count.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and | |
* the readme will list any important changes. | |
* | |
* @see https://docs.woocommerce.com/document/template-structure/ | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 3.3.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
?> | |
<p class="woocommerce-result-count"> | |
<?php | |
if ( $total <= $per_page || -1 === $per_page ) { | |
/* translators: %d: total results */ | |
printf( _n( 'Showing the single result', 'Showing all %d results', $total, 'woocommerce' ), $total ); | |
} else { | |
$first = ( $per_page * $current ) - $per_page + 1; | |
$last = min( $total, $per_page * $current ); | |
/* translators: 1: first result 2: last result 3: total results */ | |
printf( _nx( 'Showing the single result', 'Showing %1$d–%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ), $first, $last, $total ); | |
} | |
?> | |
</p> |
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up
<?php | |
/** | |
* Show options for ordering | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/orderby.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and | |
* the readme will list any important changes. | |
* | |
* @see https://docs.woocommerce.com/document/template-structure/ | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 3.3.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
?> | |
<form class="woocommerce-ordering" method="get"> | |
<select name="orderby" class="orderby"> | |
<?php foreach ( $catalog_orderby_options as $id => $name ) : ?> | |
<option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option> | |
<?php endforeach; ?> | |
</select> | |
<input type="hidden" name="paged" value="1" /> | |
<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?> | |
</form> |
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up<?php | |
/** | |
* Product Loop Start | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/loop-start.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and | |
* the readme will list any important changes. | |
* | |
* @see https://docs.woocommerce.com/document/template-structure/ | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 3.3.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
?> | |
<ul class="products columns-<?php echo esc_attr( wc_get_loop_prop( 'columns' ) ); ?>"> |
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up<?php | |
/** | |
* The template for displaying product content within loops | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/content-product.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and | |
* the readme will list any important changes. | |
* | |
* @see https://docs.woocommerce.com/document/template-structure/ | |
* @package WooCommerce/Templates | |
* @version 3.4.0 | |
*/ | |
defined( 'ABSPATH' ) || exit; | |
global $product; | |
// Ensure visibility. | |
if ( empty( $product ) || ! $product->is_visible() ) { | |
return; | |
} | |
?> | |
<li <?php wc_product_class(); ?>> | |
<?php | |
/** | |
* Hook: woocommerce_before_shop_loop_item. | |
* | |
* @hooked woocommerce_template_loop_product_link_open - 10 | |
*/ | |
do_action( 'woocommerce_before_shop_loop_item' ); | |
/** | |
* Hook: woocommerce_before_shop_loop_item_title. | |
* | |
* @hooked woocommerce_show_product_loop_sale_flash - 10 | |
* @hooked woocommerce_template_loop_product_thumbnail - 10 | |
*/ | |
do_action( 'woocommerce_before_shop_loop_item_title' ); | |
/** | |
* Hook: woocommerce_shop_loop_item_title. | |
* | |
* @hooked woocommerce_template_loop_product_title - 10 | |
*/ | |
do_action( 'woocommerce_shop_loop_item_title' ); | |
/** | |
* Hook: woocommerce_after_shop_loop_item_title. | |
* | |
* @hooked woocommerce_template_loop_rating - 5 | |
* @hooked woocommerce_template_loop_price - 10 | |
*/ | |
do_action( 'woocommerce_after_shop_loop_item_title' ); | |
/** | |
* Hook: woocommerce_after_shop_loop_item. | |
* | |
* @hooked woocommerce_template_loop_product_link_close - 5 | |
* @hooked woocommerce_template_loop_add_to_cart - 10 | |
*/ | |
do_action( 'woocommerce_after_shop_loop_item' ); | |
?> | |
</li> |
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up
<?php | |
/** | |
* Product Loop End | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/loop-end.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and | |
* the readme will list any important changes. | |
* | |
* @see https://docs.woocommerce.com/document/template-structure/ | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 2.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
?> | |
</ul> |
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up
<?php | |
/** | |
* Pagination - Show numbered pagination for catalog pages | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/pagination.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and | |
* the readme will list any important changes. | |
* | |
* @see https://docs.woocommerce.com/document/template-structure/ | |
* @package WooCommerce/Templates | |
* @version 3.3.1 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
$total = isset( $total ) ? $total : wc_get_loop_prop( 'total_pages' ); | |
$current = isset( $current ) ? $current : wc_get_loop_prop( 'current_page' ); | |
$base = isset( $base ) ? $base : esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) ); | |
$format = isset( $format ) ? $format : ''; | |
if ( $total <= 1 ) { | |
return; | |
} | |
?> | |
<nav class="woocommerce-pagination"> | |
<?php | |
echo paginate_links( apply_filters( 'woocommerce_pagination_args', array( // WPCS: XSS ok. | |
'base' => $base, | |
'format' => $format, | |
'add_args' => false, | |
'current' => max( 1, $current ), | |
'total' => $total, | |
'prev_text' => '←', | |
'next_text' => '→', | |
'type' => 'list', | |
'end_size' => 3, | |
'mid_size' => 3, | |
) ) ); | |
?> | |
</nav> |