WordPress.org

Ready to get started?Download WordPress

Forums

Same tag name issue (11 posts)

  1. php02
    Member
    Posted 1 year ago #

    Problem when saving "tag1" and "{tag1}" WordPress take it same. Unable tu save both "tag1" and "{tag1}".

  2. s_ha_dum
    Member
    Posted 1 year ago #

    Those brackets will be stripped when creating the post slug. That is the problem.

    The reason is that the slug appears in URLs so the slug is cleaned for URLs.

    You should be able to have a tag with name='tag1' and slug='tag1' and also a tag with name='{tag1}' and slug='tag1-2' but not one with name='{tag1}' and slug='{tag1}', which I assume is what you want.

  3. php02
    Member
    Posted 1 year ago #

    Thanks but what i have to do to solve this issue?

  4. s_ha_dum
    Member
    Posted 1 year ago #

    It is not an issue. You can't have curly braces in the URL. I told you what your options are.

  5. php02
    Member
    Posted 1 year ago #

    But i need curly braces in tag name i.e "{tagname}" and also "tagname" i want these both.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Why do you need the curly braces?

  7. s_ha_dum
    Member
    Posted 1 year ago #

    You can have curly braces in the tag name but you can't have them in the tag slug. Read what I wrote above carefully. If you name a tag 'tag' and name another one '{tagname}' then the slug, which appears in the URL, for the second tag will be 'tagname-1' and the URL for the tag will be '<your-site-name>/tags/tagname-1'. You can't have '<your-site-name>/tags/{tagname}'. Curly braces are not valid in URLs. For the web to work, URLs have to follow rules. Curly braces breaks one of those rules.

  8. php02
    Member
    Posted 1 year ago #

    i don't need curly braces in to the slug i need only in tag name.For example i want to save two tags 1. "tag" and 2. "{tag}" but word press remove braces from tag name if i save these both.But if i save only "{tag}" it works fine but i need both "tag" and "{tag}" at a time.

  9. s_ha_dum
    Member
    Posted 1 year ago #

    What version of WordPress are you using?

  10. php02
    Member
    Posted 1 year ago #

    my WordPress version is 3.3.1

  11. s_ha_dum
    Member
    Posted 1 year ago #

    On a WordPress 3.3.1 install, I can do exactly what I described above. I created 'tagwithbrackets' and '{tagwithbrackets}'. The tag names are exactly that, including the brackets. The respective slugs, however, are tagwithbracket and tagwithbrackets-2. I can do this from the Posts->Tags screen or from the tag box on the post edit page.

    I can't duplicate your problem.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags