WPIntell

Source evidence

Not working well for excerpt and description

Dynamic Month & Year into Posts · support · 2025-03-05T09:20:00+00:00

mixedsentiment
highseverity
0.94relevance
7replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 34 rows with source links

14.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
meteorlxy resolved
I have deactivated all other plugins except Rank Math SEO and switched back to the default theme. It seems that shortcodes are not rendered correctly in post-excerpt and meta description. Any suggestions? Thanks for the report. I can confirm that this is the case. It hasn’t been tested a lot with FSE themes. I will start working on an update to improve this. Here is what I found: 1. WordPress deletes shortcodes from auto-generated excerpts. But if you use a custom excerpt https://cln.sh/v8w0vzYqGCFbmJfP9X2n you will get the desired output. Note that this is a core feature . 2. Once you do that, Rank Math loads the meta description correctly as well. Please let me know if this works for you. Thanks for the tips! I found the related code: https://github.com/WordPress/WordPress/blob/239f2e0f0c9b96ae030823e2169c997ecc839ca8/wp-includes/formatting.php#L3956-L3957 It seems that we don’t have a proper filter before calling strip_shortcodes . A possible solution is to replace the default wp_trim_excerpt filter in the get_the_excerpt hook and remove the strip_shortcodes from it. Maybe we can exclude our shortcodes from being stripped via strip_shortcodes_tagnames hook. Also, it seems that strip_shortcodes is only being used in wp_trim_excerpt in wp core. The purpose is to avoid rendering unexpected blocks. But our dynamic date shortcodes only render inline text, so it should be safe to keep them. Nice ideas. Implemented. Please update to 1.3.9 and let me know if something is still broken. Great! Thanks. I saw your commit on Github. I fact I also created a PR but didn’t know the github repo was not up to date. BTW I saw something may need to be improved in your new commit: .DS_Store files should be excluded from git repo Using array_search inside a loop might not be an optimized solution. Some options: Using array_diff directly – simpler to implement Replace array_search with a hash map to improve performance. See this Thank you. And yes, I don’t keep SVN and Github in sync but will try from now and on. Pushed a new updated.

Comments

7 shown
Gaurav Tiwari 2025-03-05T10:17:00+00:00

Thanks for the report. I can confirm that this is the case. It hasn’t been tested a lot with FSE themes. I will start working on an update to improve this.

Gaurav Tiwari 2025-03-05T10:32:00+00:00

Here is what I found: 1. WordPress deletes shortcodes from auto-generated excerpts. But if you use a custom excerpt https://cln.sh/v8w0vzYqGCFbmJfP9X2n you will get the desired output. Note that this is a core feature . 2. Once you do that, Rank Math loads the meta description correctly as well. Please let me know if this works for you.

meteorlxy 2025-03-05T13:43:00+00:00

Thanks for the tips! I found the related code: https://github.com/WordPress/WordPress/blob/239f2e0f0c9b96ae030823e2169c997ecc839ca8/wp-includes/formatting.php#L3956-L3957 It seems that we don’t have a proper filter before calling strip_shortcodes . A possible solution is to replace the default wp_trim_excerpt filter in the get_the_excerpt hook and remove the strip_shortcodes from it.

meteorlxy 2025-03-05T13:52:00+00:00

Maybe we can exclude our shortcodes from being stripped via strip_shortcodes_tagnames hook. Also, it seems that strip_shortcodes is only being used in wp_trim_excerpt in wp core. The purpose is to avoid rendering unexpected blocks. But our dynamic date shortcodes only render inline text, so it should be safe to keep them.

Gaurav Tiwari 2025-03-05T15:26:00+00:00

Nice ideas. Implemented. Please update to 1.3.9 and let me know if something is still broken.

meteorlxy 2025-03-06T02:47:00+00:00

Great! Thanks. I saw your commit on Github. I fact I also created a PR but didn’t know the github repo was not up to date. BTW I saw something may need to be improved in your new commit: .DS_Store files should be excluded from git repo Using array_search inside a loop might not be an optimized solution. Some options: Using array_diff directly – simpler to implement Replace array_search with a hash map to improve performance. See this

Gaurav Tiwari 2025-03-06T11:11:00+00:00

Thank you. And yes, I don’t keep SVN and Github in sync but will try from now and on. Pushed a new updated.