New Plugin: Simple Footnotes

Update: I have since updated this plugin. Want to learn more? Check out more recent posts.

When writing “On PHP”, I realized I needed footnotes. A search of the plugins directory revealed a number of plugins, but most were either old, overly complicated, or needed some work. I needed something dead simple.

Twenty minutes later, I had a quick plugin serving my need. Jeff Waugh asked me about it, and so here it is.

A whopping forty lines of code, it leverages the ref shortcode and ↩ as the return arrow. Style it yourself — I have some code in my child theme of Twenty Ten. 1 I can think of a few things I could add to it, like being able to optionally number footnotes yourself (would be helpful if you added one later) or customizing little things like display options. But for now, it’s simple, and it works.

Feedback encouraged of course. The plugin is available in the WordPress Plugin Directory. Here’s the source. The current version is 0.2.

Notes:

  1. Here’s what I use:

    #content .simple-footnotes { font-size: 13px; line-height: 17px; margin-top: 20px; color: #777 }
    #content .simple-footnotes p.notes { margin-bottom: 0 }
    #content .simple-footnotes ol { margin-top: 0; }
    #content .simple-footnotes li { padding-top: 10px }
    .entry-content sup, .entry-content sub { font-size: 11px }
    sup { bottom: .75ex }
    

    (Yes, other shortcodes work inside these footnotes!)

Published by

Andrew Nacin

Lead developer of WordPress, living in Washington, D.C. Follow me on Twitter.

8 thoughts on “New Plugin: Simple Footnotes”

    1. Thanks!

      Tested it with the <!--more--> tag this morning, and surprisingly it worked as expected, showing the notes that appeared before the more tag below the ‘Continue reading’ link. That got me excited.

      A better idea would be to suppress the footnotes there, and then have the footnote numbers actually link to the post. But hey, at least it isn’t broken.

      Now excuse me while I go give myself the ability to write footnotes in comments. 🙂 [ref]It works![/ref]

  1. Simple and beautiful.

    This is an effective way to organize your sources and help your readers.

    Thanks Andrew!

  2. I have just installed and it works fine, many thanks for developing the plug-in!

    The only problem I have is that I use diacritical marks in the footnotes, and although at the foot of the page it is OK, in the pop up it doesn’t look right because it uses a different font.

Comments are closed.