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:
- 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!) ↩
Simplicity at it’s best Andrew, very nice! 😀
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]
And the first thing I discover is that not only does comment_text() not pass the comment ID to the corresponding filter, but it doesn’t even pass the comment ID to get_comment_text(). Sigh.
http://core.trac.wordpress.org/ticket/14261
Looks even cooler, going to have to try make use of this plugin!
Simple and beautiful.
This is an effective way to organize your sources and help your readers.
Thanks Andrew!
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.
I Am Going To have to return again whenever my course load lets up nevertheless I am getting your Rss feed so i can go through your site offline. Cheers.