Support » How-To and Troubleshooting » What code, where, controls length of Category ‘names’?

What code, where, controls length of Category ‘names’?

  • My category names seem to be limited to approximately 55 characters. (Maybe 58?)

    What does this, where? What file? What line of code? I want to change it.


Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m also looking for the answer to the above question – although hopefully the above user has found an answer by now 🙂

    I want to use quite long category names and wondered if there’s a way to override the cut-off of around 56 characters?I need to get it up to around 70 characters.

    Would really appreciate anyone’s help on this matter. Even though this is an old post I thought I’d try asking the question here rather than starting a new thread…hope it works!

    On the other hand, if anyone knows that it’s not possible to override the character cut-off point, then that’d be really useful to know so that I can take another approach.

    Many thanks.

    This might be in the database, instead of in the code. I haven’t looked myself (and haven’t time right now, just posting before heading to town), but you might check there first: wp_categories would be the table I think, and then you’d need to look at the structure to see how the text fields are set up.

    If it’s set as “longint” or something, with a 255 char limit, then you know the problem IS in the code, and you’ll at that point have to consider whether you want to hack core code every time wp gets upgraded….

    Thanks vkaryl – that’s really helpful.

    I’ve looked in the wp_categories table and have found that the cat_name field is set as varchar(55).

    Does this mean that I can edit this field and increase the character length to my required number (around 70)?

    Just back…. I believe so, I haven’t myself done that sort of thing, but there’s nothing to stop you trying – just backup the database first, using the Export function….

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘What code, where, controls length of Category ‘names’?’ is closed to new replies.