Meta description showing excerpt

  • I’ve customized the meta description for a post type, using placeholder text and %title%. This description shows on the dashboard for all the posts. However, inside the actual post and on the web page, it’s showing the excerpt.

    • This topic was modified 5 days, 7 hours ago by  Rick1963.
Viewing 14 replies - 1 through 14 (of 14 total)
  • Hello,

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

    This is a bit unexpected, would you mind sharing some screenshots of how this looks on the backend along with a link to one of the affected pages so that we can advise further?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    I would love to. How do I share screenshots. I don’t see any way to attach images!

    Hi Rick,

    Please edit the sensitive data section and share some links from Google Drive or any image sharing platform such as https://snag.gy/

    I hope this info helps. Thank you.

    Is there an easier method?

    Hello,

    You can also edit the first post on this ticket and include your WP logins in the designated Sensitive Data section so that we can check this first hand.
    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:

    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):

    WP Security Audit Log

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi there,

    Thanks for the patience.

    It looks like there is some code that is interfering with the generation of the description for this post type on your site. I have however added the following snippet on your theme to override this:

    add_filter( 'rank_math/frontend/description', function( $description ) {
        if ( is_singular( 'listings' ) ) {
            //global $post;
            $value = RankMath\Helper::get_settings( 'titles.pt_listings_description' );
            return '' !== $value ? RankMath\Helper::replace_vars( $value, [] ) : '';
            
        }
    
        return $description;
    });

    I hope this info helps. Thank you.

    “some code interfering”… will this be fixed in a future release of Rank Math, so I don’t have to rely on custom code?

    Also, it would be helpful if you had added a comment with code to explain the purpose.

    Also, does this code override all meta description settings for all post types?

    Hi Rick,

    This feature works as expected on my end, it is not a Rank Math issue.
    You may want to perform a conflict test to isolate what is causing this on your end to avoid using the code: https://rankmath.com/kb/check-plugin-conflicts/

    Apologies for the missing comments, I have added the comments as shown below:

    /*
     * Code to check the meta description that is set on the Rank Math
     * Titles & Meta > Factoring listing description and return it
     * for single listings
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
        if ( is_singular( 'listings' ) ) {
            //global $post;
            $value = RankMath\Helper::get_settings( 'titles.pt_listings_description' );
            return '' !== $value ? RankMath\Helper::replace_vars( $value, [] ) : '';
            
        }
    
        return $description;
    });
    

    Thank you.

    very strange

    If I had a dollar for every support response that blames it on plugin conflict, I wouldn’t need to be doing all this in the first place.

    Hi Rick,

    I understand your frustration. This is the most common cause of broken functionality since some plugins do not use WP standards during development.

    Please let us know if we can offer additional help. Thank you.

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

You must be logged in to reply to this ticket.