Single Product Description meta tag

#257071
  • Resolved don vi
    Rank Math free

    Hello,

    Just missing feature how to add “Product description” in the “Product meta description” –

    %excerpt% this one doesn’t fit for us, because it shows a very small amount of text.

    How to put the full product description there?

    thanks

Viewing 4 replies - 16 through 19 (of 19 total)
  • don vi
    Rank Math free

    Sorry for the issue,

    Admin access is granted

    Hello,

    I was able to check that you have added the %woo_full_desc% variable in the Titles & Meta settings. As my colleague has already mentioned, this is the order we follow to generate meta descriptions for WooCommerce products:

    1. Content from SEO Description field
    If that is missing, then:
    2. WooCommerce Excerpt or Product Short Description
    If that is missing, then:
    3. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
    If that is missing, then:
    4. Auto generated Content from the product page (long description)

    Since you are adding the variable in the Titles & Meta, adding a short description will override that. You can use the filter given below to make the Titles & Meta first priority to fetch the description:

    add_action( 'rank_math/frontend/description', function( $generated ) {
    	if ( ! is_product() ) {
    		return $generated;
    	}
    
    	global $post;
    	$desc = RankMath\Helper::get_settings( "titles.pt_product_description" );
    	$desc = RankMath\Helper::replace_vars( $desc, $post );
    	return empty( $desc ) ? $generated : $desc;
    });

    Hope this helps. Let us know if you need any other assistance.

    don vi
    Rank Math free

    hi, access is granted

    sorry for the issue

    Hello,

    Have you tried the filter that my colleague provided to override the default settings and the way our plugin generates the meta description?

    Let us know if that helps fix the issue.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 4 replies - 16 through 19 (of 19 total)

The ticket ‘Single Product Description meta tag’ is closed to new replies.