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

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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.

    Thread Starter php02

    (@php02)

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

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

    Thread Starter php02

    (@php02)

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

    Why do you need the curly braces?

    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.

    Thread Starter php02

    (@php02)

    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.

    What version of WordPress are you using?

    Thread Starter php02

    (@php02)

    my WordPress version is 3.3.1

    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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Same tag name issue’ is closed to new replies.