• Resolved Mati

    (@mattheus)


    I switched from yoast to rankt math. a great plugin so far!

    Unfortunately I came across 3 pits obstacles.

    1. I used for both all snippet Description “%excerpt%” so that all page content would be taken over. now I have also tried that for the “Single Product Description” but I always get the “short product description”. I would like to display the “large product description” (%term_description%” than i get “undefined”).

    2. In yoast SEO i used for the “Homepage label” (Label used for homepage link (first item) in breadcrumbs.) a icon element (<i class=”ri-home-4-line”></i>) . When i do it in rank math the icon is not showing. The home label don’t support html

    3. Is there also a function or option to automate the product titel as keyword for the single product? i have 90.000 products…. I readed this page but no solution.

    It would be nice if you could help me with this.

    • This topic was modified 3 years, 6 months ago by Mati.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @mattheus,

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

    1. Can you please explain what is the long description here? Even Yoast does not provide any variable for the long description. Did you add some code to show the content from the Long description?

    2. Breadcrumbs Homepage label: We do not support tags in the Breadcrumb settings that’s why the imported <i> tag is getting replaced with the default label. The only way you can add an icon is by using the code we mentioned here:
    https://wordpress.org/support/topic/font-awesome-icon-as-home-in-breadcrumbs/#post-12543227

    3. Use Product title as Keyword: The code in the following KB should work
    https://rankmath.com/kb/how-to-automate-the-insertion-of-focus-keyword/

    4. You can import the data again by following this guide:
    https://rankmath.com/kb/yoast-seo-migration/

    Hope that helps.

    Thread Starter Mati

    (@mattheus)

    Hello,

    1. what i mean is i want the page content in the “single product description” see the marked box link in the picture

    2. thanks for the solution of the “Homepage label” is it possible to apply it in an update without function?

    3.I tried the codes but they don’t work. I have tried the following functions:

    • Automatically Use the Post Title as the Focus Keyword
    • Automatically Use the Product Category as the Focus Keyword (this one doesn’t work and this takes the category title so unnecessary for me)

    I need one that takes the product title and puts it in the keyword automatically.

    4. thank you. I also looked but couldn’t find any solutions.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @mattheus,

    1. This is the order we follow to generate meta descriptions for WooCommerce products or product categories for that matter:
    a. Content from SEO Description field
    If that is missing, then:
    b. WooCommerce Excerpt or Product Short Description
    If that is missing, then:
    c. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
    If that is missing, then:
    d. Auto-generated Content from the product page.

    However, if you want to force the use of the 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. Once done, clear your website’s cache and check the published product meta description via the page’s source code.

    2. Unfortunately, we don’t have any immediate plan on adding it to the next update. For now, you may need to refer to the guide we presented previously.

    3. After applying the code, please visit the post list page in your admin dashboard to trigger the function. If that doesn’t work, kindly clear the website cache. Let us know how that goes.

    4. If #3 option still doesn’t work, let us know, and we will investigate this further.

    Looking forward to helping you.

    Thread Starter Mati

    (@mattheus)

    the function does not work. I also bought PRO.

    i know how functions work, just applied neatly but it doesn’t work.

    So I need a function before I’ll email you otherwise

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @mattheus

    The function is working fine on our setup:
    https://i.rankmath.com/bF9i4G

    We have also demonstrated how to change the post_type parameter in the code for the automation you are seeking.

    Hope that helps. Than kyou.

    Thread Starter Mati

    (@mattheus)

    Hello,

    1. what i mean is i want the page content in the “single product description” see the marked box link in the picture
    – is still not working

    3.I tried the codes but they don’t work. I have tried the following functions:
    Automatically Use the Post Title as the Focus Keyword
    Automatically Use the Product Category as the Focus Keyword (this one doesn’t work and this takes the category title so unnecessary for me)
    – is still not working

    Wen i use that function like in the video: https://i.rankmath.com/bF9i4G the website is braking

    can you convert this to an internal ticket? maybe I can give sensitive data and you can test this logged in

    • This reply was modified 3 years, 3 months ago by Mati.
    • This reply was modified 3 years, 3 months ago by Mati.
    • This reply was modified 3 years, 3 months ago by Mati.
    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @mattheus,

    1. This is not possible with the functions from our plugin since the short description field is added by WooCommerce to the website, so to manipulate the data from there, you need to use filters from WooCommerce.

    We can only add the option of setting the data from any of the descriptions as the meta description on the page, but that is not what you are asking for.

    3. If you could share more details on the error you are getting on your website while using this function, we could advise further. If you enable the error logging on the website by following this article, you should be able to share that information with us:

    Debugging in WordPress

    Looking forward to helping you.

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

The topic ‘Single Product Description %excerpt% not working’ is closed to new replies.