Support » Plugin: Rank Math - SEO Plugin for WordPress » How to not use excerpt for Meta Description

  • Resolved wasanajones

    (@wasanajones)


    RankMath is automatically using the excerpt to generate the meta description snippet.

    I don’t want that to happen.

    Is there a way to prevent that without having to edit each post? (setting or function)

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rank Math

    (@rankmath)

    Hello

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

    Please add the following code in your theme’s functions.php file to use the description from the settings instead of the excerpt:
    https://rankmath.com/kb/filters-hooks-api-developer/#use-global-meta-description

    Hope that helps.

    thanks for prompt reply

    however, still have problems with this

    in Admin > DASHBOARD / SEO TITLES & META > Posts > Single Post Description it defaults to %excerpt% and won’t let me leave it blank.

    so I tried other options such as %sep% or %sitedesc% etc…or plain text…

    these display in the post editor desktop preview… until something is added to excerpts and then that overrides the meta description with the excerpt.

    this happens whether or not the referenced code snippet is added to functions.php

    I’ve cleared caches and tried on another site with same result.

    this is a multisite – network activated, beaver builder theme, and Disable Gutenberg plugin

    it appears that something is forcing excerpt to be used.

    Plugin Author Rank Math

    (@rankmath)

    Hello @wasanajones

    Yes, the default value is set to %excerpt%. Removing it will fallback to %excerpt%.

    Sorry to disappoint but there is no way to keep it blank.

    There is only a filter that you can use to change the description on the frontend.

    With that being said, there are existing feature requests, so we’ve added your vote to our internal suggestions lists. If your suggestions are something that we’re able to introduce, we’ll be sure to let you know.

    Thank you.

    thanks for reply

    just to be fully clear on this.

    when I have default set globally other than %excerpt% – ie some plain text or something else such as %sitedesc% – it reverts to the excerpt no matter what if there is custom excerpt

    that’s not a feature, that’s a bug

    the functions.php snippet referred to in earlier reply has no impact on this behavior and is actually not needed

    it makes Rank Math unusable for me, which is a shame.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.