开发者 | shawfactor |
---|---|
更新时间 | 2022年8月8日 11:54 |
捐献地址: | 去捐款 |
PHP版本: | 5.2 及以上 |
WordPress版本: | 6.0 |
<p>
becomes <p id="lh_element_id-p-23463-3">
.
Note if an id for an element already exists, it is kept. Also note this is done dynamically so ar no time is the content stored in the database changed.
There is also an optional feature to add a link to the paragraph symbol at the end of the post, like this. ¶ See faq for enabling this.
These additions allow anyone to link directly to that paragraph in the post. This is useful for long tracts of text and is also useful for rdf and semantics (in that these technologies often require identification of parts of a page).
Requires wp_body_open
Note this plugin requires wordpress 5.2 and for your theme to support the wp_body_open hook (most good themes do).
Like this plugin? Please consider leaving a 5-star review.
Love this plugin or want to help the LocalHero Project? Please consider making a donation.
By default, automtic paragraph links are turned off, they can be turned on by a filter like this: add_filter('lh_paragraph_ids_link_enabled', function(){ //Do something with the content return true; });
The plugin does not add anything to the content stored in the database, all attributes are added dynamically by the plugin. So you can safely deactivate the plugion if you no longer want the functionality it enables
The LocalHero project website and the Melbourne Touch rugby association I founded both run on the same multisite that runs this plugin. View source to see it in action, the additonal ¶ functionality is not enabled.
The LocalHero project website and the Melbourne touch rugby association I founded both run on the same multisite that uses this plugin.
LH Paragraph Ids, and all LocalHero plugins are made to WordPress standards. Therefore they should work with all well coded plugins and themes. However not all plugins and themes are well coded (and this includes many popular ones). If something does not work properly, firstly deactivate ALL other plugins and switch to one of the themes that come with core, e.g. twentyfirteen, twentysixteen etc. If the problem persists please leave a post in the support forum: https://wordpress.org/support/plugin/lh-paragraph-ids/. I look there regularly and resolve most queries.
Please contact me for custom work and enhancements here: https://shawfactor.com/contact/.