Disable all meta descriptions?

#55020
  • Resolved Mar
    Rank Math free

    Hi,

    Is there a way to disable all meta descriptions for posts and pages?

    If I use %excerpt%, then Rank Math will pull the excerpt, correct? I would like Google to do this instead.

    Thanks for your help!

    Martin

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

    Thank you for contacting Rank Math today.

    Do you wish to use excerpt for all your published and future posts. If so you can use the following code for meta description to read from global settings which you can then set to excerpt.

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

    Hoping this helps you. Thank you.

    ​​​​​​

    Mar
    Rank Math free

    Thank you for getting back to me and for your help.

    I would like to generate no excerpt whatsoever (neither through Rankmath nor through the built-in WordPress function) and let Google pull the excerpt on its own. Does your code do that? Thanks!

    Hello,

    Thank you for the follow up.

    The code above is to make sure all your posts get description from the global meta settings. The excerpt generated by Rank math would not be different from excerpt generated by Google. Unfortunately we do not have a function to completely remove meta description.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Mar
    Rank Math free

    Excellent, thank you so much! This helps a lot.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    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 5 replies - 1 through 5 (of 5 total)

The ticket ‘Disable all meta descriptions?’ is closed to new replies.