Woocommerce Global Value Empty

#157914
  • Resolved DTNL
    Rank Math free

    We would like to have put the Global value setting of the Single Product Description in all woocommerce products. Currently all the products are showing an empty field and the excerpt value is automatically loaded due to the RankMath mechanism. We would like to put the value from the Single Product Desciption into all our Woocommerce post.

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.

    You can set the meta description for all of your products by heading to your WordPress Dashboard > Rank Math > Titles & Meta > Post Types: Products
    Product Description

    Here’s a link for more information:
    https://rankmath.com/kb/titles-and-meta/#single-product-description

    You can check this screencast I’ve created:
    https://i.rankmath.com/MnbSdj

    I hope that helps. Thank you, and looking forward to your update.

    DTNL
    Rank Math free

    Thanks for the reply.

    I will explain a bit more regarding the issue.

    [1]. We have set the Global setting, and we want to use that setting for all Woocommerce posts. see screenshot: https://snipboard.io/O80bvT.jpg
    [2]. We want to keep using the Excerpt field for SEO purpose. So we cannot leave this empty. Rank math has the logic to use the excerpt value instead of Global settings… and that is something we want to change. the current work-around is to empty all the excerpt field to get the Product desciption loaded with Global Setting. see screenshot:
    https://snipboard.io/iDU1bZ.jpg
    [3]. This is the automated filled description we want to see, we do add the excerpt value, but in the global setting. https://snipboard.io/fvyKgk.jpg

    We do have already used most of the suggested code from the RankMAth knowledge base. one of the lastest code what we used is:

    https://support.rankmath.com/ticket/use-product-description-meta-from-settings-instead-of-excerpt/

    but its still not working…

    Hello,

    Thank you for the update, and sorry for the delay.

    Please use the filter below to force the default meta description you have set to your products.

    /**
     * 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 in the Edit snippet, it will not work there as the filter will run when the product page loads in the browser. Please refer to this screencast:
    https://i.rankmath.com/ZN0Je2

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

    DTNL
    Rank Math free

    Thanks for the reply. indeed. in the source it is displaying right!

    Hello,

    It seems that the solution we have provided is already working. Could you confirm if this issue is already resolved and we can close now the ticket?

    If you have any other concerns, please don’t hesitate to contact us anytime by creating a new ticket to assist you further with anything else.

    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 ‘Woocommerce Global Value Empty’ is closed to new replies.