|
|
Question : Wordpress: Can't Edit Category Slug - Changes Not Saved
|
|
When I attempt to change the slug of a category, an error message appears in the upper left that says "Category Not Updated". The category currently has no published posts attached to it, only one draft post. I went ahead and added a published post to the category, but it still won't update. Other categories do not have this problem.
For example, trying to change from, "long-category-slug-name" to "short-category-slug".
When I change the title or description of the same category, it updates OK. That would exclude it being a problem with write permissions to the database.
Any ideas why I can't update the Category Slug?
|
Answer : Wordpress: Can't Edit Category Slug - Changes Not Saved
|
|
>>I'm using Wordpress v2.3.3 (as indicated in the Tags of the post.) sorry ...missed that
an apostrphe is a special char in this case, as mysql and mssql use single quotes for data comparisons if you have direct access to the db you can use a query to rename the slug, if you try that and it still does not accept the change then i'm not sure what the problem could be, changing it in the db will allow you to maintain your exisitng relatioships to the slug/category
you can see your slugs with this SQL statement
SELECT * FROM [dbname].[prefix_]terms o;
dbname= name of the db you gave when setting up your wp instance and prefix is the prefix you gave for table naming, if any then find the slug you want to rename find its term_id and
!!! IMPORTANT!!! where clause is very important!!! if you do not include a where it will reset all the slugs to the new value and unless you are baclking up your db then you CANNOT undo this change
UPDATE [dbname].[prefix_]terms SET slug = 'new-value' WHERE term_id=idOfCategoryFoundInStepAbove;
|
|
|
|
|