rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Sitemap does not convert shortcode #261

Open grndis opened 10 months ago

grndis commented 10 months ago

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