Hello,
Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.
Could you please confirm if you’re getting any error messages upon applying the filter?
Also, the knowledgebase link you have shared is for the Rank Tracker feature.
Here’s the full guide you can follow to add focus keywords automatically:
https://rankmath.com/kb/how-to-automate-the-insertion-of-focus-keyword/
Hope that helps.
Thank you.
Hello,
Please share the exact code you’re using on your website so that we can check the issue further for you.
Looking forward to helping you.
Thank you.
added the code on the function.php can you please check this?
Hello,
If you like, we can take a closer look at the settings for you. 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/
We really look forward to helping 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.