当前位置: 首页>>代码示例>>PHP>>正文


PHP woocommerce_template_single_excerpt函数代码示例

本文整理汇总了PHP中woocommerce_template_single_excerpt函数的典型用法代码示例。如果您正苦于以下问题:PHP woocommerce_template_single_excerpt函数的具体用法?PHP woocommerce_template_single_excerpt怎么用?PHP woocommerce_template_single_excerpt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了woocommerce_template_single_excerpt函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wpb_wl_hook_quickview_content

function wpb_wl_hook_quickview_content()
{
    global $post, $woocommerce, $product;
    ?>
	<div id="wpb_wl_quick_view_<?php 
    echo get_the_id();
    ?>
" class="mfp-hide mfp-with-anim wpb_wl_quick_view_content wpb_wl_clearfix">
		<div class="wpb_wl_images">
			<?php 
    if (has_post_thumbnail()) {
        $image_title = esc_attr(get_the_title(get_post_thumbnail_id()));
        $image_link = wp_get_attachment_url(get_post_thumbnail_id());
        $image = get_the_post_thumbnail($post->ID, apply_filters('single_product_large_thumbnail_size', 'shop_single'), array('title' => $image_title));
        $attachment_count = count($product->get_gallery_attachment_ids());
        if ($attachment_count > 0) {
            $gallery = '[product-gallery]';
        } else {
            $gallery = '';
        }
        echo apply_filters('woocommerce_single_product_image_html', sprintf('<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="prettyPhoto' . $gallery . '">%s</a>', $image_link, $image_title, $image), $post->ID);
    } else {
        echo apply_filters('woocommerce_single_product_image_html', sprintf('<img src="%s" alt="%s" />', wc_placeholder_img_src(), __('Placeholder', 'woocommerce-lightbox')), $post->ID);
    }
    ?>
		</div>
		<div class="wpb_wl_summary">
			<!-- Product Title -->
			<h2 class="wpb_wl_product_title"><?php 
    the_title();
    ?>
</h2>

			<!-- Product Price -->
			<?php 
    if ($price_html = $product->get_price_html()) {
        ?>
				<span class="price wpb_wl_product_price"><?php 
        echo $price_html;
        ?>
</span>
			<?php 
    }
    ?>

			<!-- Product short description -->
			<?php 
    woocommerce_template_single_excerpt();
    ?>

			<!-- Product cart link -->
			<?php 
    woocommerce_template_single_add_to_cart();
    ?>

		</div>
	</div>
	<?php 
}
开发者ID:AndyA,项目名称:River,代码行数:59,代码来源:wpb_wl_hooks.php

示例2: the_excerpt

 /**
  * Create the excerpt for embedded products - we want to add the buy button to it.
  *
  * @since 2.4.11
  * @param string $excerpt Embed short description.
  * @return string
  */
 public static function the_excerpt($excerpt)
 {
     global $post;
     // Make sure we're only affecting embedded products.
     if (self::is_embedded_product()) {
         if (!empty($post->post_excerpt)) {
             ob_start();
             woocommerce_template_single_excerpt();
             $excerpt = ob_get_clean();
         }
         // Add the button.
         $excerpt .= self::product_buttons();
     }
     return $excerpt;
 }
开发者ID:CannedHead,项目名称:feelingsurf,代码行数:22,代码来源:class-wc-embed.php

示例3: the_excerpt

 /**
  * Create the excerpt for embedded products - we want to add the buy button to it.
  *
  * @since 2.4.11
  * @param string $excerpt Embed short description.
  * @return string
  */
 public static function the_excerpt($excerpt)
 {
     global $post;
     // Get product.
     $_product = wc_get_product(get_the_ID());
     // Make sure we're only affecting embedded products.
     if (self::is_embedded_product()) {
         echo '<p><span class="wc-embed-price">' . $_product->get_price_html() . '</span></p>';
         if (!empty($post->post_excerpt)) {
             ob_start();
             woocommerce_template_single_excerpt();
             $excerpt = ob_get_clean();
         }
         // Add the button.
         $excerpt .= self::product_buttons();
     }
     return $excerpt;
 }
开发者ID:woocommerce,项目名称:woocommerce,代码行数:25,代码来源:class-wc-embed.php

示例4: do_action

 * @hooked woocommerce_template_loop_product_thumbnail - 10
 */
do_action('woocommerce_before_shop_loop_item_title');
?>
			        </a>
			    </div>
			</div>
			<div class="product-meta col-md-8 ">
				<h4 class="name"><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h4>
	           	<?php 
woocommerce_template_single_rating();
woocommerce_template_loop_price();
woocommerce_template_single_excerpt();
?>
	           	<div class="button-groups">
	                <div class="button-item clearfix">
	                    <?php 
do_action('woocommerce_after_shop_loop_item');
?>
	                </div>
	            </div>
			</div>
		</div>
	</div>
</div>
开发者ID:devmoonshine,项目名称:development,代码行数:31,代码来源:content-product-list.php

示例5: kt_woocommerce_single_product

    function kt_woocommerce_single_product()
    {
        ?>
        <div class="product-detail-info">
            <div class="product-section">
                <?php 
        woocommerce_template_single_meta();
        woocommerce_template_single_rating();
        woocommerce_template_single_excerpt();
        ?>
            </div>
            <div class="product-section">
                <?php 
        woocommerce_template_single_add_to_cart();
        ?>
                <div class="group-product-price">
                    <label><?php 
        esc_html_e('Price', 'kutetheme');
        ?>
</label>
                    <?php 
        woocommerce_template_single_price();
        ?>
                </div>
            </div>
            <div class="product-section">
                <?php 
        woocommerce_template_single_sharing();
        ?>
            </div>
        </div>
        <?php 
    }
开发者ID:hikaram,项目名称:wee,代码行数:33,代码来源:woocommerce.php

示例6: thb_single_product_summary

    function thb_single_product_summary()
    {
        ?>
		<div class="thb-product-header">
			<?php 
        woocommerce_template_single_title();
        woocommerce_template_loop_rating();
        woocommerce_template_single_price();
        ?>
		</div>
		<div class="thb-product-excerpt thb-text">
			<?php 
        woocommerce_template_single_excerpt();
        ?>
		</div>
		<?php 
    }
开发者ID:alfredpp,项目名称:sarath-portfolio,代码行数:17,代码来源:theme-woocommerce.php

示例7: the_title

                                </div>

                                <h3><?php 
    the_title();
    ?>
</h3>

                                <?php 
    echo $product->get_price_html();
    ?>

                                <!--</a>-->

                                <div class="excerpt">
                                    <?php 
    woocommerce_template_single_excerpt($loop->post, $product);
    ?>
                                </div>

                                <?php 
    woocommerce_template_loop_add_to_cart($loop->post, $product);
    ?>

                                <i class="fa fa-chevron-down"></i>

                                <div class="active-arrow-bottom"></div>
                            </div>
                        </li><!-- /span3 -->
                    <?php 
}
?>
开发者ID:bayzeel,项目名称:WPTeaShopTheme,代码行数:31,代码来源:index.php

示例8: yit_shop_product_description

 function yit_shop_product_description()
 {
     if (yit_get_option('shop-product-description-on-list') == 'yes') {
         echo '<div class="product-description">';
         woocommerce_template_single_excerpt();
         echo '</div>';
     }
 }
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:8,代码来源:woocommerce.php

示例9: yit_shop_grid_description

function yit_shop_grid_description()
{
    $description_class = '';
    if (yit_get_option('shop-view-show-description')) {
        $description_class .= 'show-on-list';
    }
    if (yit_get_option('shop-classic-show-description')) {
        $description_class .= 'show-on-classic';
    }
    if (!empty($description_class)) {
        $description_class = ' ' . $description_class;
    }
    ?>

<div class="product-description<?php 
    echo $description_class;
    ?>
">
    <?php 
    woocommerce_template_single_excerpt();
    ?>
    </div><?php 
}
开发者ID:VitaliyProdan,项目名称:wp_shop,代码行数:23,代码来源:woocommerce.php


注:本文中的woocommerce_template_single_excerpt函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。