Global meta description does not work for all posts

#920731
  • Kasper
    Rank Math free

    Hi,

    We have made a global meta description (look here: https://imgur.com/a/4UbCxDg) that are used on an ACF custom post type. But on some posts, it seems that RankMath cuts off the meta description, and I don’t know why.

    Let’s take an example: https://productpare.dk/menstruationstrusser/

    The current meta description is: “Hvilken menstruationstrusser er bedst i test? Vi har sammenlignet 7 menstruationstrusser og fundet de bedste modeller. Rapporten inkluderer mærker som WUKA og”

    Now, I know you don’t understand the danish language, but the end of the description is cut off after the word “og” (see here: https://imgur.com/a/fux8SGR). The global description is supposed to list a second brand after the word “og”, but it does not.

    However, If i hardcode the global meta description inside the post’s rankmath meta description settings, it will work and list both brands – and hence not cut off the meta description (here: https://imgur.com/a/vrmHeVT and here: https://imgur.com/a/iqDpYF6).

    This is a problem. It’s not appropriate that I have to hardcode a meta description inside the post for it in order to display in its full length. I thought that defining the global meta description would be enough.

    Do you know what the problem can be? On some pages, the global meta description correctly display the full meta description, like here: https://productpare.dk/juletraesfod/

    So it seems that RankMath is cutting of length some times?

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

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

    We’ve checked the description from the URL you shared, and it is not cut off:

    Hvilken menstruationstrusser er bedst i test? Vi har sammenlignet 7 menstruationstrusser og fundet de bedste modeller. Rapporten inkluderer mærker som WUKA og Imse Wimse.

    Could you please confirm if you have already corrected it manually as you described?

    Looking forward to helping you.

    Kasper
    Rank Math free

    Are you there?

    Hello,

    Please check your site and confirm you do not have a custom filter/snippet to limit the SEO description character count.

    We look forward to helping you.

    Thank you.

    Kasper
    Rank Math free

    When using the brand shortcode in any other area than the meta description, nothing is cut off. So, it seems like RankMath is cutting off the length. I have no custom filter/snippet to limit that – I don’t even know how to limit it. Is there a RankMath setting that can limit it? Please provide som help on this.

    Hello,

    Thank you for contacting support.

    Our plugin truncates the global meta description to 160 characters as that is usually the most number of characters that search engines will show on SERPs.

    You can see the code used for that here: seo-by-rank-math\includes\frontend\paper\class-singular.php

    If you want to override that behavior you need to use some custom code to remove the limit with something like this:

    
    add_action( 'rank_math/frontend/description', function( $description ) {
        global $post;
    
        if( $post ) {
            $global_description = RankMath\Helper::get_settings( "titles.pt_{$post->post_type}_description" );
            $description =  RankMath\Helper::replace_vars( $global_description, $post );
        }
    
        return $description;
    });
    
    Don't hesitate to get in touch if you have any other questions.
    
    Kasper
    Rank Math free

    So, it is the intention that the meta descriptions are cut off, as I have explained? It is something RankMath does automatically?

    Hello,

    Yes, that is the default behavior in the description field.

    However, you can use the filter we shared above to change that in Rank Math.

    Looking forward to helping you.

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

You must be logged in to reply to this ticket.