Automatic title generation with additional keywords

#667634
  • Resolved Anonymous
    Rank Math free

    Hello,

    I am using Rank Math on my site and I need some help customizing how titles are generated for SEO purposes.

    My goal is to automatically add 5 additional preset keywords to each post title, in addition to the main title.

    For example, if a post title is “Batman”, I want the generated titles to be:

    Batman ciao
    Batman ita ciao
    Batman sub ciao
    Batman strumin
    Batman oppo
    Where “ciao”, “ita”, etc are always the same additional keywords.

    Ideally I would like a simple way to define the additional keywords once, and have Rank Math automatically insert them after the main title in the generated snippets.

    Please could you advise on the best way to achieve this? I’m happy to use code if needed, but want it to work automatically without manual intervention on each post.

    Any suggestions or code samples would be greatly appreciated. Let me know if you need any clarification or have additional questions.

    Thank you in advance for your help!

    PS: Of course if I have to buy rank math pro to do this tell me.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for reaching out to us with your question about customizing the title generation in Rank Math for SEO purposes.

    To automatically add additional preset keywords to each post title, you can use a code snippet in your theme’s functions.php or rank-math.php file. This will allow you to define the additional keywords once and have Rank Math automatically insert them after the main title in the generated snippets.

    Here is an example code snippet that you can use:

    /**
     * Function to automatically add additional keywords to post titles
     */
    function add_additional_keywords_to_title($title) {
        $additional_keywords = array('ciao', 'ita', 'sub', 'strumin', 'oppo'); // Define your additional keywords here
    
        $additional_keywords_string = implode(' ', $additional_keywords);
    
        $new_title = $title . ' ' . $additional_keywords_string;
    
        return $new_title;
    }
    add_filter('rank_math/frontend/title', 'add_additional_keywords_to_title');

    You can add this code snippet to your theme’s functions.php or rank-math.php file. Make sure to replace the $additional_keywords array with your own additional keywords.

    Once you have added the code snippet, Rank Math will automatically append the additional keywords to each post title in the generated snippets.

    Please note that this code snippet is for the free version of Rank Math. If you are using Rank Math Pro, there may be additional options available to achieve this functionality.

    I hope this helps! If you have any further questions or need assistance, feel free to ask.

    Best regards,
    Rank Math Support

    Sources:
    How to Automate the Insertion of Focus Keyword » Rank Math
    Bulk Editing Options in the Rank Math SEO Plugin

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    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.

Viewing 1 replies (of 1 total)

The ticket ‘Automatic title generation with additional keywords’ is closed to new replies.