WordPress.org

Ready to get started?Download WordPress

Forums

Categories and fixed IDs (3 posts)

  1. edir
    Member
    Posted 4 years ago #

    I would like to understand why on wordpress, when I change the name of a category, the ID is changed too. Why this happens?

    Because of this I can't expect to use category ID on template or plugin because if the client change their names, all my work is lost.

    Is their something I can do?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    The id represents the category's record number in your database. Once a category is created, its record (id) remains fixed - irrespective of how many times its title changes.

    Try using the category name or slug instead of its id.

  3. edir
    Member
    Posted 4 years ago #

    The slug or title are the same, both change when you edit the category. The only information would be the ID but even this wordpress has changed, so, there is no static information on taxonomy system, everything can change when you simply edit.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags