Hello @simmods
Thank you for your message.
Rank Math does not use WP’s excerpt function instead we have created our own excerpt function which gets the paragraph from content that has the focus keyword or the first paragraph.
In your content, the first paragraph has a link text that’s why the description is showing the download link.
We have reported it internally. We can check how WP generates the excerpt from content paragraphs and use the same code in our plugin too.
For now, please add the following code in your theme’s functions.php file:
add_filter( 'rank_math/frontend/description', function( $description ) {
if ( ! is_singular() ) {
return $description;
}
global $post;
$rank_math_description = get_post_meta( $post->ID, 'rank_math_description', true );
$focus_keywords = get_post_meta( $post->ID, 'rank_math_focus_keyword', true );
if ( $rank_math_description || $focus_keywords || ! empty( $post->post_excerpt ) ) {
return $description;
}
return get_the_excerpt();
});
Hope that helps.
Yes, it helped, but when will it be fixed in the plugin
Hello @simmods
The enhancement will be included in the upcoming update.
We will let you know once that is released.
Thank you.
There is a new update, but I don’t see this issue resolved
Hello @simmods
Sorry, but the fix was not included in the latest update.
It will be included in the next update.
We request you to please continue using the code we provided.
We will let you know once the update is released.
We seek your patience and understanding in this matter.
If there’s anything else we can help you with, please let us know.
We are here to assist. Thank you.