I couldn’t write a product meta description

#646741
  • Resolved Zehra Guler
    Rank Math free

    Hi,

    I’m trying to write product meta description but I need help.
    When I’m writing automatically from the single product description, it didn’t write automatically.
    Besides, product short description is fully written and it didn’t override. Website have many products and we can’t write product description for each products.

    You can see the screenshot: https://prnt.sc/moHZHhtLUkiq
    https://prnt.sc/q_XNlNSQxkpO

    Can you help of this topic?

    Sincerely,
    Zehra

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please note that this is the order we follow to generate meta descriptions for WooCommerce products:

    1. Content from the 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)

    However, if you want 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 on your website:

    /**
     * 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;
    });
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    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 and please don’t hesitate to let us know if you have any other questions.

    Thank you.

    Hi again,

    As you said, I installed the code snippet plugin and wrote the code into it. Then I cleaned the caches. Then I wrote an automatic description in the single product description section. But it still didn’t pull the automatic description.
    Can you check if there is any situation that I can’t see? I think I applied all steps correctly.

    Writing code into code snippet: https://prnt.sc/OCYex7oifvBD
    Single Product Description after the following steps: https://prnt.sc/nfe1qvYqIO_H
    Checking product description via page’s source code: https://prnt.sc/8l4QjXVclLPG

    Hello,

    We deeply apologize for the unexpected delay in response. Your previous reply seems to have been stuck in our drafts section for some reason.

    We’ve checked some of your products and we can see the default single product description is working properly.

    If you’re still facing the issue, please try to clear your browser cache and check again. You can also use our external meta tag analyzer tool to check the description of your product pages: https://rankmath.com/tools/meta-tag-analyzer/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘I couldn’t write a product meta description’ is closed to new replies.