I’ve created a simple plugin for WordPress sites. The Paragraph Level IDs plugin adds an ‘id’ attribute to each paragraph tag in a blog post, giving the author and readers additional functionality.
So for example,
There is also an optional feature to add a link to the paragraph at the end of the post, like this. #
These additions allow anyone to link directly to that paragraph in the post. This is especially useful for long tracts of text, academic writing, and legal documents.
I have written an accompanying blog post, explaining what inspired me to write the plugin.
Installation works just like most other WordPress plugins.
- Download the plug-in from the WordPress plugin repository.
- Unzip the files and upload the folder to the wp-content/plugins directory. (WordPress also has a built-in plug-in installer so you could upload the files by that method instead).
- Visit the plugins section of your WordPress Dashboard.
- Activate the plugin
- Nothing will be changed in your website’s source code until you visit the ‘Paragraph IDs’ options under the WordPress ‘Settings’ menu.
Please add a review for this plugin!
Please review this plugin on the WordPress plugins directory, and add your vote to the ‘compatability’ section to let others know that it works.
1.0 (current version) - Thanks to the fantastic work of my friend Alastair Mucklow, its a far better thing. The end-of-paragraph links are now as I would wish them, and an opportunity to highlight the linked passage. 30/04/2014
0.2 – Added a settings menu, with the ability to add an ‘id’ to the
<p> tags, an anchor, or both; and customisation options. 02/10/2013
0.1 – A very simple proof-of-concept with no settings. 29/09/2013
In the future I hope to make the following improvements.
- Streamline the code so it is at its most efficient and smallest file size.
- Further customisation options for the id
- A degree of backwards compatibility
- Ensure the layout of the settings page is as pretty and efficient as possible.
- Language localisation for the settings page.
The code for this plug-in is on GitHub. I would welcome any advice, offers of support, bug-testing, forking the project and troubleshooting to help make these extra features possible.