Product Categories – Dynamic Variable Not Rendering

#1056534
  • Resolved Catalin
    Rank Math free

    Hi Rank Math Team,

    I’m experiencing an issue where the meta description is not rendering at all on WooCommerce Product categories pages (e.g.https://samstore.ro/echipamente-retea/).

    Here’s what I’ve tried:

    In Rank Math > Titles & Meta, I set:

    Category Archive Titles: %term% %sep% %sitename%
    Category Archive Descriptions:Buy %term_description% online at best prices | Free shipping available.

    But in the front-end HTML source, the %term_description% is missing entirely.

    /style><title>Sisteme audio-video – SAMstore.ro</title><meta name=”description” content=”Buy online at best prices | Free shipping available.”/><meta name=”robots”

    I’ve tried %term% and %term_description% , neither works.

    I cleared all cache (LiteSpeed, browser, server).

    I verified the taxonomy is registered and visible in Rank Math.

    Even when switching to the default Storefront theme, the issue persists.

    Could you help me understand why Rank Math is not outputting the complete meta description for product categories archives?

    Site: https://samstore.ro
    Rank Math Version: 1.0.247
    WooCommerce Version: 9.9.5

    Thanks in advance for your help!

    Best regards,
    Catalin

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

    We apologize for the issue you are facing with the meta description not rendering on your WooCommerce product category pages. Thank you for providing detailed information about the steps you’ve taken so far.

    Based on your description, it seems that the dynamic variable %term_description% is not being processed correctly. Here are a few things you can check:

    1. Ensure Term Descriptions are Set: Make sure that the term descriptions for your product categories are actually filled in. You can check this by going to Products > Categories in your WordPress dashboard and editing the specific category to see if a description is provided.

    2. Check for Conflicts: Since you’ve already tried switching to the default Storefront theme, it might be worth checking for plugin conflicts. Temporarily deactivate other plugins (except Rank Math and WooCommerce) to see if the issue persists.

    3. Update Rank Math: Ensure that you are using the latest version of Rank Math. If there are any updates available, please update the plugin as they may contain bug fixes related to your issue.

    4. Debugging: You can enable debugging in WordPress to see if there are any errors being logged that might give us more insight into what’s happening.

    If after these checks the issue still persists, we recommend replying to this ticket with any additional details or findings, and a human agent from our support team will take over and assist you further.

    Thank you for your patience, and we look forward to resolving this for you!

    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 (long description)

    Here’s a link for more information:
    https://rankmath.com/kb/how-to-set-product-meta-description/

    If you want to force the usage of the meta description from Titles & Meta settings, you may need to use this filter on your site:

    /**
     * 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_category() && (empty($desc))){
     $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 the filter: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Please note that the description will not show while editing your product category pages, so you can verify the description in the page’s source code.

    Hope that helps.

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

The ticket ‘Product Categories – Dynamic Variable Not Rendering’ is closed to new replies.