DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Fun Edit Posts Link (✍)

Posted by on

Tiny little fun idea by Dave Rupert.

Put this:

<?php edit_post_link('✍','',' '); ?>

before all your:

<?php the_title() ?>

So like:

<h1><?php edit_post_link('✍','',' '); ?> <?php the_title() ?></h1>

And when logged in, if you have edit privileges for that post/page/whatever, you’ll see the titles like:

✍ How To Be Awesome

Where the little icon is a clickable link to edit that page. Just gotta make sure your page is UTF-8, which I bet it already is.

13 Responses

  1. Really cool – didn’t understand Dave’s tweet. I kept on looking at the graph thinking, “what the hell does this have to do with anything!?”. Now I get it!

  2. This make the edit post link WAY less annoying. Thanks!

  3. It’s much safer when code files are limited to ASCII. I’d replace the hand with ✍, the HTML entity equivalent.

  4. Just curious if escaping the ampersand will work: ✍ (otherwise, the icon keeps getting rendered).

  5. why not use the front end editor plugin : http://wordpress.org/extend/plugins/front-end-editor/

    • I usually tend to think of thinks from the other point of view – why bother loading a plugin when something lighter and simpler exists?

      • Ahsan July 4, 2011

        I totally agree , its not that the wordpress editor take hours to load :)

  6. cool ツ
    yay ٩(●̮̮̃•̃)۶

  7. OK…. gonna hafta admit I like this! Tucks that little icon away, nice and nonintrusive

  8. MatthewJenkins June 28, 2011

    Oh no, I’m the only person in the universe who’s wordpress theme is not UTF-8.

    Coda says: You are trying to insert characters which cannot be handled by the file’s current encoding without losing information. Do you want to insert the characters anyway?

    It gives me three options: Promote to UTF-16, Promote to UTF-8, or Insert.

    Strangely, “cancel” is not an option…

  9. Weird.

    My browser doesn’t display that as a symbol ( it displays a square box with number 27 on top and 00 at the bottom. )

    OS = window XP SP3
    Browsers = FF5 / Chrome12

    and the page is UTF 8

Comments are closed. Contact us with any critical information. Thank you!

Code is poetry