Is there any way to turn off “permalinks” only for tags in WordPress?
I’d like to keep the ?tag= structure and have the tags displayed without slashes, but also keep post and page URLs with nice permalinks.
For example:
With permalinks on I’d like to have tag linked like this: ?tag=carrot instead of /tag/carrot/
The reason for doing this is a bit long and complicated, but if you think it is relevant, I might include it in the replies.
You can use the
term_linkfilter in WordPress, which filters the URL for any of the term links (tags, categories, custom taxonomies) to just change the links for tags to use the query instead of the permalinks. Adding the following to a plugin or your theme’sfunctions.phpfile should do the trick.There is no useful documentation yet for
term_linkfilter on the WordPress Codex, but looking at the source may help if you want to explore further.