Viewing 6 replies - 1 through 6 (of 6 total)
  • Stef

    (@serafinnyc)

    For having products go in a particular order you can number them, if there aren’t that many, in the advance section of the backend. I’ve created a Loom for you here.

    As for displaying the excerpt of the product that will depend. You could write a hook in your child theme’s function to display the excerpt. Is that what you’re wanting to do?

    If so you would do this:

    function product_short_description() {
        the_excerpt();
    }
    add_action( 'woocommerce_after_shop_loop_item_title', 'product_short_description', 40 );
    

    If your excerpts are too long you can shorten them by using this hook after the one above:

    function get_ecommerce_excerpt(){
        $excerpt = get_the_excerpt();
        $excerpt = preg_replace(" ([.*?])",'',$excerpt);
        $excerpt = strip_shortcodes($excerpt);
        $excerpt = strip_tags($excerpt);
        $excerpt = substr($excerpt, 0, 50); // Change the character amount here. 50 is usually good.
        $excerpt = substr($excerpt, 0, strripos($excerpt, " "));
        $excerpt = trim(preg_replace( '/s+/', ' ', $excerpt));
    return $excerpt;
    }
    
    Thread Starter iadzemovic

    (@iadzemovic)

    Yes! Thank you!

    Stef

    (@serafinnyc)

    Cool. Welcome!

    Thread Starter iadzemovic

    (@iadzemovic)

    It appears it works on the product page – but I don’t see the desc on the grid layouts. Is there a way to make a collapsable desc add? Like a plus sign that opens up and displays the description directly from the grid?

    Stef

    (@serafinnyc)

    Yes, it’s in the settings of the plugin for each product you add to the bundle. You also change description, title and price. I’ve been using it for years.

    Just know if it doesn’t do what you need you have 30 days to get a refund.

    Thread Starter iadzemovic

    (@iadzemovic)

    I don’t think I need all that to accomplish just one set of code. There must be a way through code to just add that the product description displays below the product title?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Please help me add product body or description to the blocks interface’ is closed to new replies.