Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a custom content type, 'Events'. I'm unable to rename the slug of one event from '2010-2' to '2010'. There are 6 or 7 other entries of the same content type and they're all fine.

Here's what I've done:

  • Verified no items in the Trash (for every content type, just to be sure)
  • Manually removed drafts, autosaves and revisions from the database
  • Verified that no other existing piece of content has 2010 in its slug

EDIT Worth noting that "/events/2010" actually redirects to "/events/2010-2"

share|improve this question
    
Why can't you just manually rename it? When editing the post, you should be able to click "edit" in the permalink field and edit it. You're not able to do that? –  Aliyah Aug 2 '12 at 3:01
    
I had this problem once and wound up forcing the slug to be set as the one I wanted on save using a db query. Unfortunately I do not have the code in front of me right now. I would not recommend it anyway as it is a dirty hack. –  Joseph Aug 2 '12 at 3:02
    
did you check thoroughly the table wp_posts? the attachments also have slugs. also check post_content and guid columns, might have something using "2010" –  peteroak Aug 2 '12 at 3:05
    
@Aliyah Sure I can do that, but it renames it right back to '2010-2' as if there were a duplicate. –  Mike Aug 2 '12 at 3:05
1  
For sure you have missed something. Your site will only add -2 if there is an original somewhere. Try making sure everything is gone and permanently deleted again –  Aliyah Aug 2 '12 at 3:07
show 8 more comments

1 Answer 1

Items left in your trash will directly affect new permalinks being appended with -$N.

share|improve this answer
    
Verified no items in the Trash he said he did. –  peteroak Aug 2 '12 at 3:42
    
I know he said he did, I read that. But humans often err. :-) –  Aliyah Aug 2 '12 at 8:13
2  
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. –  Brian Fegter Aug 29 '12 at 1:30
    
@BrianFegter The author thinks that posts in the trash do affect the permalink generation. I don't know if this happens, but I leave it as "Looks good" during review. –  kaiser Aug 30 '12 at 12:45
    
@kaiser You're right. Edited and upvoted this answer. –  Brian Fegter Aug 30 '12 at 12:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.