Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Add Product Short Description To Product Category In WooCommerce

function webroom_add_short_description_in_product_categories() {
	global $product;
	if ( ! $product->get_short_description() ) return;
	?>
	<div itemprop="description">
		<?php echo apply_filters( 'woocommerce_short_description', $product->get_short_description() ) ?>
	</div>
	<?php
}
add_action('woocommerce_after_shop_loop_item_title', 'webroom_add_short_description_in_product_categories', 5);
Comment

is product category woocommerce

if( has_term( 4, 'product_cat' ) ) {
	// do something if current product in the loop is in product category with ID 4
}
Comment

PREVIOUS NEXT
Code Example
Php :: case inside laravel query 
Php :: table drop foreign php laravel 
Php :: Session store not set on request. 
Php :: yii2 pjax 
Php :: laravel get url path 
Php :: bin to dec php 
Php :: phpmailer send attachment 
Php :: php password validation regex 
Php :: [DoctrineDBALDBALException]Unknown database type enum requested, DoctrineDBALPlatformsMySqlPlatform may not support it. 
Php :: laravel blade check if yielded content exists 
Php :: laravel custom 404 blade 
Php :: eloquent model sort by ascending order 
Php :: wordpress check if page is password protected 
Php :: a facade root has not been set laravel 
Php :: how do decode base64 php 
Php :: best pagination in laravel api with eloquent 
Php :: php create url with query sting from array 
Php :: foreach total sum 
Php :: osx php 
Php :: Array and string offset access syntax with curly braces is no longer supported in C:xampphtdocse-examPHPExcelPHPExcelSharedString.php on line 529 
Php :: return last inserted id in laravel 
Php :: capitalize php 
Php :: json stringify php decode 
Php :: laravel object to array 
Php :: php token generator 
Php :: how-to-call-ajax-in-wordpress 
Php :: datetime get month php 
Php :: find curren monday in laravel carbon 
Php :: wordpress max post revision 
Php :: eloquent limit vs take 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =