Helping Organisations get organised!

Using the plugin

Linking to a paragraph

View the page source, or use your browser’s developer tools, to find the id of the paragraph or heading you want, then add it to the page address after a #. Ids are numbered in order down the page for each kind of element, so lh_element_id-p123-3 is the fourth paragraph of post 123 and lh_element_id-h2123-0 its first second-level heading.

Because the numbers come from the position of each element, adding or removing a paragraph above one changes its id. For a link that must never change, give the block its own HTML anchor in the editor (Block settings, Advanced, HTML anchor): an element that already has an id keeps it.

Paragraph links

The plugin can add a ¶ link at the end of each paragraph, pointing at that paragraph, so readers can copy a link without viewing the source. It is off by default; turn it on with a filter:

add_filter( 'lh_paragraph_ids_link_enabled', '__return_true' );

Removing the plugin

The ids are added each time a page is shown and nothing is saved to your content or database, so the plugin can be deactivated or deleted at any time. Links that point at a paragraph id will then open the page at the top.

If you like this plugin please consider making a donation to further development