• Short description of Woocommerce on scissors search page.
    How to limit a text fragment to 20 words?
    Now the short description of the product shows up in full ….
    Classic posts are abbreviated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @joannapl,

    I am sorry, I don’t think I can understand you.

    Would you mind sharing your live site URL for us to check?

    Kind regards,
    Herman ??

    Thread Starter joannapl

    (@joannapl)

    @bsfherman
    If we have WooCommerce installed, we have 2 search engines on the website.
    One product (woocommerce) and the other general (wordpress).

    When searching for an issue in a wordpress search engine, pages, entries and product tags are shown.
    Entries, pages display well. Photo, title and supporting text eg from entry – first 25 words (Excerpt).
    However, this is not the case in the product.
    If in the product I have to add a simple description, a short description – it is displayed in the search results.
    However, it is no longer reduced to 25 words, but all 500 words are displayed.

    Thread Starter joannapl

    (@joannapl)

    @bsfherman
    If I turn off showing short description on the store’s website, they will not be shortened to 25 words.
    The entire text of 500 words is displayed – this is the short description for a given product.
    This short description also does not shorten in the search results.

    IMG: https://ibb.co/FbNQRVK

    While browsing the theme files, I found the code responsible for displaying the short description for the store’s website (I haven’t found it for the search engine page).

    if ( ! function_exists( 'astra_woo_shop_product_short_description' ) ) :
    	/**
    	 * Product short description
    	 *
    	 * @hooked woocommerce_after_shop_loop_item
    	 *
    	 * @since 1.1.0
    	 */
    	function astra_woo_shop_product_short_description() {
    		?>
    		<?php if ( has_excerpt() ) { ?>
    		<div class="ast-woo-shop-product-description">
    			<?php the_excerpt(); ?>
    		</div>
    	<?php } ?>
    		<?php
    	}
    endif;
    • This reply was modified 3 years, 8 months ago by joannapl.
    • This reply was modified 3 years, 8 months ago by joannapl.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Excerpts DONT WORK for Short description of Woocommerce’ is closed to new replies.