本文整理汇总了PHP中woocommerce_content函数的典型用法代码示例。如果您正苦于以下问题:PHP woocommerce_content函数的具体用法?PHP woocommerce_content怎么用?PHP woocommerce_content使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woocommerce_content函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: include_woocommerce_template
function include_woocommerce_template($tmpl)
{
global $gantry;
$find = array('woocommerce.php');
$file = '';
if (is_single() && get_post_type() == 'product') {
$file = 'single-product.php';
$find[] = $file;
} elseif (is_tax('product_cat') || is_tax('product_tag')) {
$term = get_queried_object();
$file = 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';
$find[] = 'taxonomy-' . $term->taxonomy . '.php';
$find[] = $file;
} elseif (is_post_type_archive('product') || is_page(woocommerce_get_page_id('shop'))) {
$file = 'archive-product.php';
$find[] = $file;
}
$find = array_reverse($find);
$template = GantryBodyLayout::locate_type($find);
if ($template && $template != '') {
return $template;
} else {
woocommerce_content();
return '';
}
return $tmpl;
}
示例2: woocommerce_content
?>
<div class="clear"></div>
</header> <!-- / END HOME SECTION -->
<div id="content" class="site-content">
<div class="container">
<div class="content-left-wrap col-md-12">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
woocommerce_content();
?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .content-left-wrap -->
</div><!-- .container -->
<?php
get_footer();
示例3: woocommerce_product_taxonomy_content
function woocommerce_product_taxonomy_content()
{
_deprecated_function(__FUNCTION__, '1.6');
woocommerce_content();
}
示例4: get_header
<?php
get_header();
?>
<div class="row">
<div class="small-100 large-75 columns" role="main">
<?php
do_action('foundationPress_before_content');
?>
<?php
while (woocommerce_content()) {
the_post();
?>
<article <?php
post_class();
?>
id="post-<?php
the_ID();
?>
">
<header>
<h1 class="entry-title"><?php
the_title();
?>
</h1>
</header>
<?php
do_action('foundationPress_page_before_entry_content');
示例5: if
<div class="section post-single woocommerce"><!-- SECTION -->
<div class="container">
<div class="row">
<?php if(is_product()){ ?>
<div class="<?php echo $single_product_layout; ?> columns">
<?php woocommerce_content(); ?>
</div><!-- END SIXTEEN COLUMNS -->
<?php if($smof_data['rnr_enable_wc_single_sidebar']) {
get_sidebar('woocommerce'); } ?>
<?php } //Main Shop page layout
else if(is_shop() || is_product_category() || is_product_tag()) { ?>
<div class="<?php echo $main_shop_layout; ?> columns">
<?php woocommerce_content(); ?>
</div><!-- END SIXTEEN COLUMNS -->
<?php if($smof_data['rnr_enable_wc_sidebar']) {
get_sidebar('woocommerce'); } ?>
<?php } ?>
</div><!-- END ROW -->
</div><!-- END CONTAINER -->
</div><!--END SECTION -->
</div><!--END SECTION -->
<?php get_footer(); ?>
示例6: woocommerce_fix
function woocommerce_fix()
{
if (is_singular('product')) {
woocommerce_content();
} else {
//For ANY product archive.
//Product taxonomy, product search or /shop landing
woocommerce_get_template('archive-product.php');
}
}