Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1000321

    Hi is there a way you can manually add the product excerpt to the Woocommerce product grid page like you can with the blog. I currently just have the title.

    I tried adding the code from this thread but it showed the whole short description which is far too long. I am not using the main Description box as the design is wrong for a catalogue.

    I need to make this page:
    http://s746132929.websitehome.co.uk/products
    look like this page:
    http://www.lfd.ltd.uk/products/

    Thanks
    Rob

    #1000948

    Hey fanlokbun,

    Can you please check out here

    if those elements help you at all?

    Best regards,
    Basilis

    #1001157

    Thanks Basilis that looks like an interesting and useful tool but I am not sure it will do what I want, For every blog entry you can have a excerpt box on the page to type what is displayed below the thumbnails. It isenabled via Screen Options and looks like this:
    Image 2018-08-24 at 10.46.27 AM.png
    Is there not a way of enabeling it for shop products?
    I know this is straying a bit off your remit but you guys are wordpress gurus and will know if it is possible or not,
    Thanks
    Rob

    #1001824

    Hi,
    Afaik this is not possible. WooCommerce replaces the “excerpt” field with the “Product short description”. However you could simply use the main description box as excerpt box. Then add this code to the functions.php:

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

    to display the main description below the product title on shop pages.

    If you don’t want to display the description tab on the product single page you can also include this code in functions.php:

    
    // add this to functions.php, a custom plugin, or a snippets plugin to remove the description tab in woocommerce
    add_filter( 'woocommerce_product_tabs', 'sd_remove_product_tabs', 98 );
    function sd_remove_product_tabs( $tabs ) {
        unset( $tabs['description'] );
        return $tabs;
    }
    

    Best regards,
    Dude

    #1002663

    Dude your a diamond! Perfect solution thanks!

    #1002687

    I just noticed there is a blue block where the description used to be.
    Image 2018-08-28 at 12.34.20 PM.png

    #1003060

    Hi,

    Can you post a link to the product/page please? I just checked the website but couldn’t find “blue blocks”.

    Best regards,
    Dude

    #1003068

    Hi Dude sorry it seems to have dissappeared since I enabled related products. You van stand down. Thanks again.

    #1003087

    Hi!
    Great, glad it works now :)

    Regards,
    Peter

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.