Automated creation of tags

#47081
  • Resolved Raghu M
    Rank Math free

    Hi, hope you are doing good, I have a query, as running the listing site so the creation of tags manually would be tedious as I have a lot of categories and locations, so can we automate the creation tags with the help of category name + location, so that whenever we add new category or location the relevant tag gets created for every category with all locations vise versa.

    I Know tags are keywords added by posting owners but still, that would be for 1 particular location.

    Here my point is for eg. let’s say we have 5 categories and 5 locations

    Category: sap training institutes | locations: bangalore

    Category: sap mm training institutes | locations: mumbai

    Category: sap abap training institutes | locations: chennai

    Category: sap fi training institutes | locations: delhi

    Category: sap pp training institutes | locations: pune

    so now tags should be like (categories + locations)

    sap training institutes bangalore

    sap mm training institutes mumbai

    sap abap training institutes chennai

    sap fi training institutes delhi

    sap pp training institutes pune

    So please let me know how to achieve this so even in the future if we add a new category or location the tag should get created automatically with other locations or categories which doesn’t exist.

    Awaiting for your reply……

    • This topic was modified 4 years, 8 months ago by Raghu M.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    Thank you for contacting Rank Math today.

    I can suggest that you register some custom replacement variables that will be able to extract the location and other data that you want to appear on the titles on the category page. For the category name, you can use the %term% variable.

    You can use this filter to register any additional variables:

    /**
     * Filter to add custom variables
     */
    add_filter( 'rank_math/vars/replacements', function( $vars ) {
     return $vars;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi good morning i hope i might have not explained to the point clearly or i might have not understood your reply.

    My point is how to create tags with title as category title + location title

    For eg. i have a category as ‘seo company’ and location as ‘india’ so now i want to know how can i automate the creation of tags by combining titles of category and location so that the tags should be like ”seo company india”

    Hello,

    Thank you for contacting Rank Math today.

    I am sorry if I was not clear as well. I don’t think that we are still on the same page. Would you like Rank Math to generate the tag title or the actual tags?
    Could you also let us know whether location is a custom taxonomy or a custom field on the post?

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi we need to generate actual tags and location is custom taxonomy.

    Todd
    Rank Math free

    Hi Raghu,

    You can use Category as well as tags to do that.

    Taking your example, set category as seo company and tag as `India.

    Then, use this template in title settings:
    null

    %category% in %tag%

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hi Todd, thanks for your reply and i understood your explanation on how to generate the title for tags, this is fine, but i need to know is there any possibality to generate tags automatically the moment we add new category or location.

    So if we add 100 + new categories the system should create tags automatically with existing locations.

    Awaiting for your reply……..

    Alberto
    Rank Math business

    Hello,

    That is not a feature Rank Math has (since it is not the objective of an SEO tool) but to help you, you could do it by creating some custom PHP code so when WordPress detects a new category created, it creates a tag automatically as you want.

    Thank you.

    Hi Alberto thanks for your reply and thats was even i was thinking, aslo could you please let me know the php code or let me know the source to find the same. thanks

    Hello,

    Thank you for contacting Rank Math today.

    I can suggest that you take a look at the wp_insert_term() function that might be able to help: https://developer.wordpress.org/reference/functions/wp_insert_term/

    You might need to get in touch with a freelance developer to help with the custom code.

    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.

Viewing 9 replies - 1 through 9 (of 9 total)

The ticket ‘Automated creation of tags’ is closed to new replies.