Default Setting Meta Title & Description Setup In Woocommerce

#887971
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    We apologize for the issue you are facing with the default Meta Title and Description setup in WooCommerce. It seems that the meta description is being pulled from the product short description instead of the default settings you configured.

    To ensure that your default Meta Title and Description are applied correctly, please check the following:

    1. Template Settings: Make sure you have set up the templates correctly in the Rank Math settings for your products. You can create a template for the product description in the Titles & Meta settings.
    2. Product Settings: When creating or editing a product, ensure that you are not overriding the default settings with a specific meta description in the product settings.
    3. Caching Issues: Sometimes, caching plugins can cause issues with displaying updated meta information. Clear your site cache and check again.

    If you have verified these settings and the issue persists, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!

    Sources:
    Rank Math ‘Titles and Meta’ Options and Settings

    Hello,

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

    1. SEO description (Rank Math meta box while editing)
    2. Product short description
    3. Single product description (Titles & Meta settings)
    4. Product description

    You can follow the steps in our guide below to add the code on your site to force the usage of the meta description you have added in Rank Math > Titles & Meta > Products > Single product description:
    https://rankmath.com/kb/how-to-set-product-meta-description/#how-to-set-single-product-description-as-meta-description

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Also, please note that the description 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 do not hesitate to let us know if you need our assistance with anything else.

    Usha
    Rank Math free

    After adding this filter in function.php in the theme the analyser (https://rankmath.com/tools/meta-tag-analyzer/) is showing the global meta which we have set on the Rankmath Plugin Which we wanted but on the product editor the meta description preview is same as before ?

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

    Hello,

    Please note that the meta description preview in the product editor will still show the short description, but it won’t affect the final output in the page’s source code.

    As long as the correct global meta description appears in the live page’s source code that is what matters.

    We hope this helps. Please let us know if you have further questions or concerns.

    Thank you.

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

You must be logged in to reply to this ticket.