Here’s the code from the Default Theme’s index.php at 1.5.2 and it seems to work.
<p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
In case you have your blog and your WP install in different directories – it won’t work. See: http://wordpress.org/docs/installation/different-address/ the Caveat section at the bottom!
Thread Starter
mush
(@mush)
That caveat makes me all very sad and stuff.
*sniff*
Hmm, maybe I’ll freak out and move my WP installation to the root of my site. I really love those Edit links!
Thread Starter
mush
(@mush)
I’ve discovered that the blog-and-WP-in-different-subdirectories issue only applies to Firefox.
In other words, the edit_post_link code that I added to my template *works* if I’m using IE, but not if I’m using Firefox.
Is this a browser issue, or a WP issue? Anyone?
I’ve found the very same and haven’t found a solution yet – edit_post_link works if using IE, but not Firefox.
However, I’ve just found it was because I wasn’t logged in in Firefox – the theme I’m working on doesn’t have log in / out stuff at the moment.
Stuck wp_loginout() back in the side bar and sure enough I was being invited to Log In. Did that and hey presto – edit links.