Single Product Description template is not populated

#186404
  • Resolved Logic Tools
    Rank Math free

    Single Product Description template is not populated on any of existing product even though the meta description field for the product were empty and always were used the default meta description. The same issues appear with both Rank Math version, i.e. Free and Business.

    A short description of the issue:
    1. Defining custom template under settings: DASHBOARD / SEO TITLES & META / PRODUCTS. The Single Product Title is working, but Single Product Description is ignored and all products have the same default meta description which is by default when installing Rank Math.
    2. We notices, that on the Woo Commerce product list we can see SEO Title and SEO Desc as expected and even edit it, but it is not shown on the product pages for the public or when the actual product is edited.

    Please see screenshots and more information under Sensitive Data

Viewing 6 replies - 1 through 6 (of 6 total)
  • Just tested this on another website. The issues are the same. Seems like a bag, that the Rank Math plugin is ignoring settings on the Single Product Description and it always is using %exceprt% unless it is manually changed at a product itself.
    Is there something broken with a function that decides do you use defined default product meta description on Rank Math settings or overwrite with the custom ones at a product level?

    Brian
    Rank Math free

    Hello,

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

    This is the order we follow to generate meta descriptions for WooCommerce product or product category 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.

    Therefore, please ensure that there is no description in the meta description field for the excerpt the option to be picked.

    If you want the description on the global settings to be picked kindly ensure that there is no description in the Product short description or except section.

    Similarly, in case you want the auto-generated content to be picked please ensure that the description of the global setting is not set/defined.

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Hi, thanks for your reply and detailed explanation.

    However, this logic doesn’t seem logical and, in my understanding, is considered as UX/UI issues that should be addressed and changed in future updates. This is simply not how it should work for an SEO plugin for advanced users.

    The second and third layer should be combined, or there must be some kind of switch to change the logic. You have so advanced meta description generation with all these dynamic variables, but it is so user-unfriendly and confusing.

    Let me explain a couple of things:
    With current logic, if I want to overwrite it with dynamic fields, I need to go to each product individually – I even cannot use bulk editor, which is showing the description version of WooCommerce Products global Single Product Description. But it is overwritten if I edit at least one character in the bulk SEO editor.
    In many cases, excerpt or product short description is used for website purposes and might be relatively long.

    OK, let’s assume that this function is working as is in the future. In this case, you really need to fix the following even if the logic stays as you described:
    The description for that field should be clarified on the Rank Math settings.
    You must not render the Single Product Description in bulk SEO editor on the products list. This is highly confusing, and the issue with this is that if I click on the bulk edit, the defined Single Product Description is editable here, but it is saved and rendered on the public only if at least one character is changed before saving. I even cannot identify on the bulk editor which products are using what. But when opening the product page, it shows default except, and the Single Product Description is not shown here.

    Do you have a suggestion board? If so, can you please share the following suggested logic with your developers or UX/UI designers?

    IF Content from SEO Description field IS NOT empty, THEN show this;
    ELSE IF Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products IS NOT empty THEN show this;
    ELSE IF Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products AND Content from SEO Description field IS empty THEN show WooCommerce Excerpt OR Product Short Description
    ELSE Auto-generated Content from the product page

    I’m not a developer, but developers should understand what I mean by this logic.

    Cheers,
    Gints.

    Hello,

    Thank you for that information, and apologies for the delay.

    To force the use of 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. You can check the published product meta description via the page’s source code. You can also check using this tool.

    Here’s a screencast (using the Code Snippet plugin) for your reference:
    https://i.rankmath.com/LfvyyU

    I hope that helps. Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Thank you very much Reinelle. This may work. Cheers

    Anas
    Rank Math business

    Hello,

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

The ticket ‘Single Product Description template is not populated’ is closed to new replies.