Hello,
Thank you for contacting Rank Math for help with a shortcode to display the primary product category.
To display the primary term name, please create the shortcode [show_primary_term] to your theme by adding the following code snippet:
function rm_display_primary_term () {
$primary_term_product_id = get_post_meta(get_queried_object_id(), 'rank_math_primary_product_cat', true);
$postProductTerm = get_term( $primary_term_product_id );
return $postProductTerm->name;
}
add_shortcode('show_primary_term', 'rm_display_primary_term');
Hope that helps. Please let us know if you have questions.
Hello,
We apologize for the delay in response.
I tried checking your screenshots and I can’t seem to access them, we are currently blocked by your server.
Can you please verify? Alternatively, you can upload the screenshots here and share the URL with us.
Looking forward to helping you.
Hello again,
no worries, here are the links https://ibb.co/km7zKYG
https://ibb.co/72FJML7
Thanks
Hello,
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.

It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
Thank you for sharing the temporary login.
Unfortunately, we can’t access your admin dashboard as we are greeted with a 403 error. Please refer to my screenshot in the sensitive data section.
If you are using a geo-blocking, please temporarily unblock the country Portugal, India and the Philippines so we can further investigate the issue.
Looking forward to helping you on this one.
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.