Support » Plugin: Rank Math SEO » Custom Description Not Working

  • Resolved MR.Mahdi


    Hi RankMath Support
    I will fill in the product description in the custom title settings section.
    In the product itself, the plugin settings are empty and without value.
    But the customized description is not sent in the output of the site and the excerpt is sent by Rank Math.
    This problem does not exist for the title and works properly

    I want to create a custom description for all products
    Please fix this problem.

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support


    Hello @mrmahdi,

    Thank you for contacting support.

    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

    In your case, you are getting the second option as the meta description for the products and it’s not reaching the third instance which is what you would want to use.

    If you want to force the settings under the Titles & Meta you can use the following filter:

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Description Not Working’ is closed to new replies.