Hello Dale,
Thanks for getting in touch with us.
You can use this filter to register your own variable and show it in the drop-down at WordPress Dashboard > Rank Math > Titles & Meta >
/**
* Action: 'rank_math/vars/register_extra_replacements' - Allows adding extra variables.
*/add_action( 'rank_math/vars/register_extra_replacements', function(){
rank_math_register_var_replacement(
'custom_variable_slug',
[
'name' => esc_html__( 'Custom variable name.', 'rank-math' ),
'description' => esc_html__( 'Custom variable description.', 'rank-math' ),
'variable' => 'custom_variable_slug',
'example' => 'custom_variable_callback()',
],
'custom_variable_callback()'
);
});
We are assuming you know a bit of PHP to make it work.
If not, please let us know so our team can help you further.
Thank you.
Yes thank you I can work with this.
Hello Dale,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.