Woocommerce Description is not displaying the right data for the existing posts

#66774
  • Resolved DTNL
    Rank Math free

    Hi,

    We have recently moved from Yoast SEO to RankMath. However we have issue with the existing product decription data. This field look fine if we create a new product. But for the existing products, its showing a default value of “excerpt”. We did not import any Yoast setting or other data. How can we replace or regenerate the description field.

    Please advise.

    Best regards,
    Jeroen Louws

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

    Thank you for contacting Rank Math today.

    The excerpt is the default meta description setting when the description field is empty. if you don’t wish to import the data from Yoast, you can set the meta data Globally under products in Rank math > Titles & Meta and then use the following filter in your theme’s functions.php to apply the use of the Description from Global Setting, if the description is missing in the Post metabox.

    /**
     * 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 ( ! $desc ) {
     $desc = RankMath\Helper::get_settings( "titles.pt_{$post->post_type}_description" );
     if ( $desc ) {
     return RankMath\Helper::replace_vars( $desc, $post );
     }
     }
    
     return $description;
    });

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

    DTNL
    Rank Math free

    thanks for the reply, we already this code in the knowlegdebase fo rank math. This code does not solve the issue.

    DTNL
    Rank Math free

    Addition information, our test team has found out this issue also impact the new post.

    So, basically, if the Woocommerce product post has no value in the excerpt, the meta data of SEO description is showing the right information. If the excerpt field has value, the SEO description will be set to the value of the excerpt field. Looks like a bug to us. This should be happen, the SEO description should also follow the setting of Rank Math. So in this situation, the only solution is to empty alle short description fields of all the products.

    Hi,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    DTNL
    Rank Math free

    Thanks. We have currently found a workaround for this. Please close this ticket as resolved.

    Hello,

    We are super happy that your issue is now resolved.

    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 ‘Woocommerce Description is not displaying the right data for the existing posts’ is closed to new replies.