15 Feb, 2011
WordPress edit_post_link doesn't display (fix)
Posted by: Jennifer In: WordPress|WordPress Hacks|WordPress: Lessons Learned
I recently ran into this problem – and I see an old thread on the forums about this. The last post there says to make sure you're logged in. (I can assure I was). But, that's not what was causing the problem. Here are the steps that got me to the problem:
Set up a new WordPress install. Logged in. Among a few other changes, I also changed the path for the site URL in the general settings to be the domain root (rather than the directory where WordPress was installed). I had made a custom theme with "edit this page" links… but they weren't showing up.
The reason: when I logged in the first time, the "admin" cookie that was set was specific to the directory where I installed WordPress – and did not apply to the root domain where it was now pointed. Since that change happened AFTER I was already logged in, WordPress did not update my cookie to include the root directory – so those pages could not see that I was in fact logged in.
The simplest fix is to log out and then log back in – which should set your cookies appropriately.