Hello,
Thank you for contacting Rank Math today.
You can use the following filter with some custom logic to dynamically change the titles:
/**
* Filter to change the page title.
*
* @param string $title
*/
add_filter( 'rank_math/frontend/title', function( $title ) {
return $title;
});
Looking forward to helping you. Thank you.
​​​​​​
do i add this and any related custom logic to my functions.php file?
yes, but how can I dynamically change titles based on post “category” ? I only want to do this for all the post in one or two particular categories, not for every post in the website.
Hi Gregg,
Yes, you can do that with the filter we gave you above. But, we assume you know some coding while putting this filter to use.
As much as we would love to offer customized solution to each and every user we have, it just isn’t possible for a small company like ours with limited resources. So, we will not be able to help with a custom code for a specific category.
Another semi-automated version would be to bulk edit all the posts in the category at once with a specific variable:
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.