Rank Math Short Code support

#46393
  • Resolved Puneet
    Rank Math free

    How to use rank math shortcode in a post, category, tag, and page <h1> heading? Because it only shows in the title area.
    Example – In the below-mentioned link, we use %currentdate% so the date is displayed in the title. but now we want to implement the same shortcode for heading title (In this case after Punjab).
    Category Punjab

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

    Thank you for contacting Rank Math today.

    To be able to use the Rank Math variables on the post titles you will need to register the following filter on your theme’s functions.php file:

    add_filter("the_title", function( $title ){
    	return RankMath\Helper::replace_vars( $title, $title );
    });

    Looking forward to helping you. Thank you.

    ​​​​​​

    Puneet
    Rank Math free

    Yes! It works on post, page title but not on the archive title & post, page content area.

    Hello,

    Thank you for contacting Rank Math today.

    Adding date short code in post content is not a functionality in Rank Math.Check here to learn how to Create a Shortcode to Display Today’s Date in WordPress Content

    Hope this helps you. Thank you.

    ​​​​​​

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Rank Math Short Code support’ is closed to new replies.