For the initiative adopt a tag I decided to adopt
<url-rewriting> and related tags.
I've started yesterday tasting the territory and, really, it's a mess.
I'm asking here to decide a rule I've to follow to make order in it.
Actually existing related tags are:
The first 2 tags, seems the most important to me, in particular I think that all the questions regarding WordPress way to handle url rewriting should be tagged
<rewrite-rules> (or maybe
<url-rewriting>) and instead use
<url-rewriting> only for questions about non WordPress rewrite rules, just like the ones in .htaccess.
<mod-rewrite> to me it seems an irrilevant tag, because it's too generic and less informative.
Last two tags, on the countrary, seems too narrow to me, I don't think it's useful tagging asnwers using specific function names, even because, just as example, a lot of questions using
add_rewrite_rule are answered using
add_rewrite_endpoint and so on...
I noticed that when a question has
<url-rewriting> and related tags, very often there are also tags like
What to do with this tags? I'd like to follow same rule for all questions, so if we decide to leave where they are, I should also add where they don't are, on the countrary, I should remove them everywhere.
Sincerly I am for second alternative.
Another common sibling tag is
<htaccess>. I think this tag is ok when Q is about edit .htaccess file directly, should be removed anywhere else. In first case I think is better add the 2 tags
<htaccess> and remove
There a lot of questions regarding the url rewrite api of WordPress, but not involving rewrite rules directly a probably not comprehensive list is:
- questions about rewrite params of
- questions about removing/adding/editing permalink base for various archives
How properly tag these sort of questions? I thing
<url-rewriting> should be the right choice. Are these questions use cases for
Last my trouble regard questions asking something I call reverse rewrite, i.e. taking a pretty url and convert it in a url with query string, not necessarily the url the WordPress related one, e. g. take an url
example.com/a-random-string/ and rewrite it in
The questions are various tagged, sometimes they have all possible tags:
<urls>, and so on..
I've answered a couple of these questions suggesting a redirect instead of a rewrite rule, but in substance, which is the proper way to tags these questions?
After responses by @ChipBennett and @Rarst, in substance, what I suggest is:
- delete tags
- add a new tag
<rewrite-api>as suggested by @ChipBennett, then make
<rewrite-rules>synonym to it
<rewrite-api>for all questions regarding any function or hook of rewrite api and also for question regarding the 'rewrite' param of cpt/taxonomy registration
<url-rewriting>for questions regarding rewrite rules not generated by WP. In these questions also use
<.htaccess>tag if relevant
- Remove tags
<permalinks>from from questions where only rewrite rules are involved
<rewrite-api>also when questions are about to extract query vars from pretty permalinks (and remove
<urls>when question are about convert a pretty url in a url with query vars not regarding WP e.g.