Global Defined Meta Description not showing in single product meta box

#49986
  • Resolved Kai Dickas
    Rank Math free

    Hi,

    i’ve set up a meta description in the rank math settings for woocommerce single prodcuts (see link to screenshot in sensitive Data Box).
    If i now edit a single product in woocommerce it does not show the description as i have set it up in rankmath settings (see link to screenshot in sensitive Data Box). It still shows the excerpt of the product like it was set up on default.

    I don’t know what i have to do so the single products uses the meta description as it is set up at the moment.

    Please tell me what to do. Thanks.

    Kai

Viewing 5 replies - 1 through 5 (of 5 total)
  • Alberto
    Rank Math business

    Hi Danie,

    Thanks for getting in touch with us.

    This is the order we follow to generate meta descriptions for WooCommerce product:

    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

    If you want to show the auto-generated description from the content ( step 4 ) then, please add the code which we provided here:

    https://wordpress.org/support/topic/make-excerpt-pull-from-product-description-instead-of-short-description/#post-12358847

    I hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hi,

    thanks for your reply. I now have a better understanding of how the plugin works in this case.

    Is there a way to change the follow order to this:
    1. Content from SEO Description field
    If that is missing, then:
    2. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
    If that is missing, then:
    (3. Auto-generated Content from the product page or short description)

    I would like to have abbility to define a description per product via the rankmath meta box. But if i didnt define anything there not the short description should be uses. Instead the template from general settings (step 2) should be used.

    Is there a way to set it up like that?

    Thanks again for your help.

    Kai

    Hello,

    Thank you for contacting Rank Math today.

    I am afraid that it is not currently possible to change the order from the UI but you can write some custom PHP code to return your preffered description on the single product page using the following filter:

    /**
     * Allow changing the meta description sentence from within the theme.
     *
     * @param string $description The description sentence.
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	return $description;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi,

    thanks for your reply. If i get this right that means if i am using this code on every single product page it uses the meta description i set up in global settings of rank math. Is that right? What if i like to add a individual description for some products via the meta box. Will that still work?

    Hello,

    Thank you for contacting Rank Math today.

    The code will need to be customized further so that it can grab a custom description and display it on the front end. You will need to get in touch with your developer so that they can help in customizing the code for this requirement.

    Looking forward to helping you. 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 5 replies - 1 through 5 (of 5 total)

The ticket ‘Global Defined Meta Description not showing in single product meta box’ is closed to new replies.