Hello,
Thank you for contacting the support.
In the code, you need to replace 'post' with the name of the required post type to run the function for that post type.
Currently, the code is set to update the focus keywords of post (posts) and you’re checking the keywords in portfolio CPT.
Please update the name of the post type in the function and see if that helps.
Let us know how that goes.
Thank you very much for fast answer, I solved it accordingly your advice.
Hello,
We are super happy that we could address your concern. If you have any other questions in the future, know that we are here to help you.
If you don’t mind us 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 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.