• Resolved globalchangeawareness

    (@globalchangeawareness)


    Hello,

    I am currently using a plugin that auto generates tags from a post title. Not ideal but as we have a number of authors posting and many of them are massively WordPress literate, this seemed to be the best way to go to ensure post tags were always being created.

    However, I have come to discover quite an obvious problem. It also creates tags for words such as:

    The
    And
    Us
    You
    Youre
    That
    This

    etc.

    Is there any way to block these tags from being created / a way to quickly delete them all in one go without having to go through each tag and tick the box?

    I’m fairly literate with code, and would happily do this through a script.

    Just seeing what options may be available and also looking for a push in the right direction.

    I’m thinking that it could be easier to create a script that has an array containing all the words I wish to remove from tags in the database and then whenever I wish to clean out these tags I run that script, would anyone be able to let me know if this is possible?

    Or if there is another, easier way to accomplish this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The best way to address this would be to prevent those tags from being created in the first place, as apposed to continuously and indefinitely having to go in and either automatically or manually delete them.

    Since you are using a plugin, have you tried reaching out to the plugin author? This seems like a pretty straight-forward issue (that others will have, too), so there might be an option somewhere that allows you to provide a list of words to exclude.

    If there isn’t an option, you might want to ask the plugin author if there is a hook so that you can use a script to prevent certain words from being added (without having to change the plugin and lose what you added after an update).

    Should neither option work, then you might have to resort to making that change in the plugin directly, knowing that you will have to re-create that change every time you update the plugin.

    I’d still recommend one of the three options as apposed to continuously adding and removing tags.

    Thread Starter globalchangeawareness

    (@globalchangeawareness)

    Hi Ryan,

    I had and he said he would add it into a new release so I took you’re advice and just had a look myself, was easy enough, just create an array of the words I want blocking and then used:

    `if(!in_array($atag, $blockedTag))’

    $atag being the word supplied after the title of the post has been split up, and $blockedTag is pretty obvious.

    Should just have looked and tried myself but I guess I was being lazy and presume the plugin would be more complex!

    Thread Starter globalchangeawareness

    (@globalchangeawareness)

    Resolved but i didnt tick the box on ^^^^ that post

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blocking / Restricting Certain WordPress Post Tags’ is closed to new replies.