Fun Edit Posts Link (✍)

Posted on: June 22, 2011 by Chris Coyier

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.

Thumb for Fun Edit Posts Link (✍)

Let's talk it out, folks.

  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!

    #1
  2. Jacob said on June 22, 2011:

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

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

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

    #4
  5. Paul said on June 23, 2011:

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

    #5
    • Chad said on June 23, 2011:

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

      #5.1
      • Ahsan said on July 4, 2011:

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

        #5.1.1
  6. Ozh said on June 23, 2011:

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

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

    #7
  8. MatthewJenkins said on 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…

    #8
  9. Paul said on July 4, 2011:

    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

    #9

Comments are closed. If you have something really important to add, contact us. Thank you!