woocommerce_product_archive_description توضیحات صفحه آرشیو محصولات

تابع ووکامرسی woocommerce_product_archive_description – نمایش توضیحات صفحه آرشیو محصولات
Syntax – سینتکس
woocommerce_product_archive_description();
Usage – نحوه استفاده
if ( !function_exists( 'woocommerce_product_archive_description' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php';
}
// NOTICE! Understand what this does before running.
$result = woocommerce_product_archive_description();
Defined – محل تعریف
/includes/wc-template-functions.php
function woocommerce_product_archive_description() {
// Don't display the description on search results page
if ( is_search() ) {
return;
}
if ( is_post_type_archive( 'product' ) && 0 === absint( get_query_var( 'paged' ) ) ) {
$shop_page = get_post( wc_get_page_id( 'shop' ) );
if ( $shop_page ) {
$description = wc_format_content( $shop_page->post_content );
if ( $description ) {
echo '' . $description . '';
}
}
}
}
versions – نسخه ها
از نسخه : 3.0.2
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر