This plugin adds footnotes to WordPress posts. The plugin is written in PHP and doesn't relay on any other file (beside those for translations).
The plugin adds footnotes to articles by looking for text in the format of ((citation text ref:URL)). When it finds this text format in the post content, it extracts the citation text and URL from it. It replaces the original text with a link to the citation and adds the citation to a list of footnotes in a sequential order. The plugin then adds the list of footnotes to the end of the post content.
- Install and activate the plugin on your WordPress site.
- In the post editor, write your post as usual and add citations in the format of ((citation text ref:URL)).
Example: ((This is my fabulous text citing an external source ref:https://domain.tld)). URL must be prefixed by
ref:
- Publish or update the post and view it on the front-end.
The plugin will automatically add superscript links to each citation in the post content and add a list of footnotes to the end of the post. When readers click on a citation link, they will be taken to the corresponding footnote in the list. When readers click on a footnote link, they will be taken back to the corresponding citation in the post content.
The plugin has a text domain of "webplus-footnotes" for localization and translation. The plugin uses the load_plugin_textdomain function to load the translation files.
The plugin Has only 2 strings available for translation and is already available in English and French :
This plugin adds footnotes to articles
References
To translate the strings:
- Open the /webplus-footnotes/languages/webplus-footnotes.pot file with your favorite .pot editor and create a new translation file for your language.
- Translate strings and export .mo and .po files. Example for spanish (Spain) es_ES: webplus-footnotes-es_ES.mo webplus-footnotes-es_ES.po
- Upload to /webplus-footnotes/languages/ folder your .mo and .po files, and voilà.
WordPress Editor
Frontend citation supscript
Frontend footnote