Hello, we apologize for the inconvenience you are facing regarding the auto-focus keyword insertion on your pages. The auto-focus keyword insertion feature in Rank Math starts when you configure it in the Keyword Manager by clicking on Auto Add Focus Keywords. This functionality allows you to automatically import focus keywords from your existing posts and new posts.
If the auto-focus keyword insertion is not working for your 30k products, you can consider using the method mentioned in this knowledge base article: How to Automate the Insertion of Focus Keyword. This method will help you automate the insertion of focus keywords into your content, making it easier to optimize a large number of products efficiently.
If you need further assistance or have any other questions, please feel free to ask. Thank you for raising this concern, and we appreciate your patience.
Sources:
How to Automate the Insertion of Focus Keyword » Rank Math
Content Analysis Tests for Product Pages » Rank Math
How Does Search Engine Rank Tracking Work? » Rank Math
What is a Focus Keyword? » Rank Math
Thanks for quick reply. I may forgot to add ”Keyword Manager by clicking on Auto Add Focus Keywords”. Where to find that option, please?
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Please ignore the reply from the RankBot. Can you please confirm if you were trying to add the following filter on your website?
function update_focus_keywords()
{
$posts = get_posts(array(
'posts_per_page' => -1,
'post_type' => 'post' //replace post with the name of your post type
));
foreach ($posts as $p) {
update_post_meta($p->ID, 'rank_math_focus_keyword', strtolower(get_the_title($p->ID)));
}
}
add_action('init', 'update_focus_keywords');
If so, please note that it will only work for posts. Also, as you have a large number of products, please add the following filter on your website and see if that works for you:
function update_focus_keywords()
{
$posts = get_posts(array(
'posts_per_page' => 100,
'offset' => 100,
'post_type' => 'product' //replace post with the name of your post type
));
foreach ($posts as $p) {
update_post_meta($p->ID, 'rank_math_focus_keyword', strtolower(get_the_title($p->ID)));
}
}
add_action('init', 'update_focus_keywords');
Please make sure to increase the offset
value by 100 each time you run the code.
Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you.
I know i need pro version for this. Do I need to buy credits for content AI as well?
I have added last code, it doesnt add focus keywords tho
Hello,
This filter also works on the free version of the plugin. However, if it is not working on your website then we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins 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/
Looking forward to helping 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.