Hello,
Thank you for contacting us.
I’m not sure whether I fully understand the question.
Could you please describe what Amount do you intend to output in the SEO title?
Looking forward to hearing back from you.
Thank you.
I have Custom Post Types “Hospitals”- at the moment I have 31 hospitals on my website. and I want to display this number – and when I get one more hospital on my website than I have 32 hospitals
Hello,
In this case, this may require you to modify our filter to create a custom variable since we don’t have a variable to count the number of CPT posts.
Please refer to this code here to create a custom variable and use the shortcode %shortcode_var_name%
:
add_action( 'rank_math/vars/register_extra_replacements', function(){
rank_math_register_var_replacement(
'shortcode_var_name', [
'name' => esc_html__( 'VAR name', 'rank-math' ),
'description' => esc_html__( 'VAR description', 'rank-math' ),
'variable' => 'shortcode_var_name',
'example' => shortcode_var_name_call_back(),
],
'shortcode_var_name_call_back'
);
});
function shortcode_var_name_call_back(){
return "Value";
}
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
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.