Not showing Meta Description

#570404
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,

    Thank you for reaching out and I’m sorry about this inconvenience.

    I’m not sure I understand your request properly, so I need some more details from you. Are you saying that the meta description you entered in Rank Math is different from what you see on your product source code? I looked at your page source and I saw that the Rank Math meta description tag is indeed present.

    Looking forward to helping you resolve this as soon as possible.

    Hello!
    In the meta description you can see the description of the product:
    https://ibb.co/8zfzL63

    not the description goal that I added to be seen in all products:
    https://ibb.co/HCpVzk1

    I did this from the Rank Math plugin.

    Thanks!

    Hello,

    This is the order we follow to generate meta descriptions for WooCommerce products or product categories for that matter:

    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.

    However, if you wanted to force the use of the description you have set in Global product settings (Rank math > Titles & meta > Products > Single Product Description), please add the following filter to your active theme’s functions.php file:

    /**
     * Use the Description from Global Setting, if the description is missing in the Post metabox
     */
    add_action( 'rank_math/frontend/description', function( $description ) {
     global $post;
     $desc = RankMath\Post::get_meta( 'description', $post->ID );
    
     if ( is_product()) {
     $desc = RankMath\Helper::get_settings( "titles.pt_{$post->post_type}_description" );
     if ( $desc ) {
     return RankMath\Helper::replace_vars( $desc, $post );
     }
     }
    
     return $description;
    });

    Please note that the filter may not be visible while editing the products as it only works when your products load in a browser. Once done, clear your website’s cache and check the published product meta description via the page’s source code.

    You can check the final output of the meta description here:
    https://rankmath.com/tools/meta-tag-analyzer/

    Hope that helps.

    Thank you.

    Excellent! It worked correctly.
    Thank you so much!

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Not showing Meta Description’ is closed to new replies.