The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

What code, where, controls length of Category 'names'? (6 posts)

  1. kenwinstoncaine
    Posted 10 years ago #

    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.


  2. atelier455
    Posted 9 years ago #

    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!

  3. atelier455
    Posted 9 years ago #

    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.

  4. vkaryl
    Posted 9 years ago #

    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....

  5. atelier455
    Posted 9 years ago #

    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)?

  6. vkaryl
    Posted 9 years ago #

    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....

Topic Closed

This topic has been closed to new replies.

About this Topic