rankmath/seo-by-rank-math

Sitemap does not convert shortcode

Opened this issue · 0 comments

grndis commented

Describe the bug
When using [shortcode] as the meta title and setting the HTML sitemap option to use the SEO Title, it should convert the [shortcode] to the title. However, in this case, the shortcode is not being converted and appears as plain [shortcode]. I have already enabled the shortcut for the title with this filter, and it works as the meta title.

add_filter(
	'rank_math/frontend/title',
	function ( $title ) {
		return do_shortcode( $title );}
);

To Reproduce
Steps to reproduce the behavior:
Use a shortcode on a single post title in RankMath, enable the HTML sitemap in the Sitemap Settings. Choose "SEO Title" as the item titles.

Screenshots
CleanShot 2023-12-11 at 13 53 23@2x