Joshua David Nelson

Bullshit Free WordPress Development

  • Services
  • Code
  • About
  • Contact

Add WooCommerce Product Description Below Product

Add the product description below the product, see: Short Description Below Product (WordPress Forums)

<?php
/**
* Add the product description (the excerpt of the cpt) below the product.
*
* @author Joshua David Nelson, [email protected]
* @link https://wordpress.org/support/topic/short-description-below-product
*/
add_action( 'woocommerce_after_shop_loop_item_title', 'jdn_add_short_description', 9 );
function jdn_add_short_description() {
// Description linked to product
$url = get_the_permalink();
if( $url ) {
echo '<span class="title-description"><a href="' . $url . '">' . get_the_excerpt() . '</a></span><br />';
} else {
echo '<span class="title-description">' . get_the_excerpt() . '</span><br />';
}
}
view raw woo-product-excerpt.php hosted with ❤ by GitHub

Source: https://gist.github.com/joshuadavidnelson/364e77d0301e253e571c

Tags: woocommerce

Previous Code:
Remove Genesis Inpost Layout Box on Posts
Back to the Code Snippets
Next Code:
Log Errors in WordPress
  • Twitter
  • RSS Feed URL

About Me

I'm a WordPress Engineer. I build sleek, custom websites with WordPress and Genesis.

See my services and my recent work.

Contact me to get your project started.

Gravity Forms Plugin for WordPress Fastest WordPress Hosting

Recent Posts

  • Using Font Awesome Icons for WooCommerce Grid / List Toggle
  • Disable Blog: WordPress Gone Blog-less
  • Category (Taxonomy) Dropdown Filtered By Post Type
  • Weather in WordPress with Dark Sky
  • Fixing Your Deprecated Widget Constructors in WordPress 4.3
  • Twitter
  • RSS Feed URL
  • Code Snippets
  • My Plugins
  • Make a Payment

© Joshua David Nelson | Hand-Forged | WordPress + Genesis | Terms of Service | Legal | Contact