Split: shortcode %currentyear% and %currentmonth%

  • It is currently April, i have used “%currentmonth%” but it shows up as “April”. I want it to show as number “4”. Please help me!

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    I would suggest that you override the meta title with some custom code and set the format of the date that you would prefer. Here is some example code that you can use:

     * Filter to change the page title.
     * @param string $title
    add_filter( 'rank_math/frontend/title', function( $title ) {
    	global $post;
    	$title = $post->post_title." ".date('m');
    	return $title;

    I hope this info helps. Thank you.



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

The ticket ‘Split: shortcode %currentyear% and %currentmonth%’ is closed to new replies.