• Hello WooCommercers,
    I have been trying to add the product category descriptions under the product grid on all category pages. I have been trying to do this for the past week with no luck.

    If anyone could help me understand what code I need to add to the editor and where to place it I would be very grateful.

    I want to have this on their for SEO purposes.
    Kind Regards,
    Michael

    http://wordpress.org/plugins/woocommerce/

Viewing 4 replies - 1 through 4 (of 4 total)
  • @michaelr1988, i just manage to put product category descriptions under Category Title.

    Do put code below into your theme if you need that:

    add_action( 'woocommerce_after_subcategory_title', 'custom_add_product_description', 12);
    function custom_add_product_description ($category) {
    	$cat_id		=	$category->term_id;
    	$prod_term	=	get_term($cat_id,'product_cat');
    	$description=	$prod_term->description;
    
    	echo '<div class="shop_cat_desc">'.$description.'</div>';
    }
    Thread Starter michaelr1988

    (@michaelr1988)

    Thanks terrytsang,
    I will give it a try. This has been driving me around the bend.
    Regards,
    Michael

    Hi Michael,

    Do let us know the result whether that works for you do that other members can use that if needed 🙂

    Regards,
    Terry

    Thread Starter michaelr1988

    (@michaelr1988)

    Unfortunately, I was enable to get this to work after trying over the weekend.

    I placed the code into the themes functions.php section with no luck.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding product category description under product grid.’ is closed to new replies.