Quantcast
Channel: killianfaughnan.com » php
Viewing all articles
Browse latest Browse all 2

Changing Your Tag’s Case In WordPress

$
0
0

Yet another pet hate of mine is things capitalised incorrectly. For me things like tags need to be either first letter uppercased of lowercases, and definitely not a mix of both. The problem with WordPress is that you unfortunately cannot change the case of a tag once it’s been used. This is because all your tags are put into a table the first time you use them, and from then on no matter what case you type a tag in, it will default to the capitalisation that is used in this table. The offending table is the wp-terms table.

This table contains a list of names and slugs (url friendly names) for all your tags. If you want to change the case of one of your tags you will need to do it here, either via console or phpMyAdmin or something else. Myself I went and just set all the names equal to the slug, and then changed the one or two tags I had with spaces in them back to something more rational. Whether you want to do it the same way as myself or not is up to you. Though if you want to you will merely need to run and update something like: UPDATE wp-terms set `name` = `slug`.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images