Post Excerpt Overriding Default Description format

#88995
  • Resolved Yung Terry
    Rank Math free

    Hi, I found that the post excerpt override the default description format.

    What I wanted to do:
    %date% %sep% %excerpt%

    what each post actually showing by default (atomically):
    %excerpt%

    When I delete the excerpt, “%date% %sep% %excerpt%” shows up. Anything I can deal with it?

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

    Thank you for contacting Rank Math today.

    By default, this is how we are setting the Meta description. The priority is given to:
    1) The Meta description value added in the Meta description field
    2) The excerpt, if #1 is missing
    3) The value from the Settings if #1 and 2 are missing.

    Looks like you want to use 3 after 1.

    For that, please add the following filter to your theme’s functions.php file:
    https://support.rankmath.com/ticket/disable-auto-generate-meta-description-if-excerpt-is-not-empty/#post-11266

    Hope that helps.

    Thanks for the reply.

    I have paste the filter provided to both theme & child theme and it doesn’t work. Should I need to modify the content since I am using custom post type?

    Thank you.

    Thanks for the reply.

    I have paste the filter provided to both theme & child theme and it doesn’t work. Should I need to modify the content since I am using custom post type?

    Thank you.

    Hello,

    Please note that adding the filter, the settings are only applied in the front end not in the preview. You can confirm the correct set description is being applied if you check your post type page source: https://i.rankmath.com/UPl0dK

    You can use this tool for the same as well: https://www.heymeta.com/

    Hope that helps. If you have any further question(s), please let us know.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Post Excerpt Overriding Default Description format’ is closed to new replies.