Hi There,
question as this plug in was not uüdate in the last 2 years, is it compatible wit WP 6?
]]>1) Creation of the anchor-targets
I read that the part of the plugin code which creates the links automatically from the H2 and H3 elements in the event of saving a page is not compatible with Gutenberg.
a) @xnau stated no timeline/plans for an update.
b) @telsenome you publicly stated interest to maybe take over. Any plans?
c) Gutenberg has the capability to specify an ID for a headline or basically any block element. That’s good enough for me!
2) Creation of the anchor-links with “The Linker”
As I understood the description text when using the “Insert Link” function of the Editor you get a search dialog which matches both in the page slugs and/or also in anchor names. And when selecting an anchor it creates a jumplink a la /page-slug#anchor-name for you.
a) Is that what it does? That would be hugely convenient for me, as I plan a lot of micro-content to which I would love convenient and quick linking.
b) Is that part working with the Gutenberg “Insert Link” widget? It is a combobox where you have search, auto-completion, and can navigate through results by scrolling or up/down keys.
Considerations
I) I could live with needing to take care of anchor-creation myself when I’d have the hugely convenient “linker” part available.
II) But I could not live with Gutenberg crashing during save or saving corrupt markup. What is the state of this? Info appreciated!
Hi,
Nice plugin! I like the simplicity.
I would like to suggest a new feature: a shortcode. So it’s easier to use it for other elements than headings. In that case add the shortcode where you want, such as: [anchor id="my-ID"]
.
You only have to create the shortcode with a few lines of code:
function anchor_shortcode($atts) {
$atts = shortcode_atts(array(
'id' => ''
), $atts);}
$anchor_id = esc_attr( $atts['id'] );
$html = '<span id="'.$anchor_id.'"></span>';
return $html;
}
add_shortcode('anchor', 'anchor_shortcode');
Oh, the intro text says “healings” instead of “headings” and the installation info comes from one of your others plugins ??
Guido
]]>The plugin is activated and I don’t get any error messages when saving (visual ones at least).
Expected behaviour: headings get id attributes automatically.
Actual behaviour: nothing happens
Thanks!
]]>The latest version of the plugin (1.6.1) has been added to a development site (non-public) running current version (4.9.6) of WordPress. ID’s are not being added to H2s, H3s in pages, and a fatal error message is generated (see below) when saving page as a draft or publishing.
Any thoughts?
Fatal error: Uncaught Error: Call to undefined function mb_convert_encoding() in /apps/cdlib/apache/htdocs/wp-content/plugins/content-anchor-links/xnau_WP_Headings_IDs.php:172 Stack trace: #0 /apps/cdlib/apache/htdocs/wp-content/plugins/content-anchor-links/xnau_WP_Headings_IDs.php(124): xnau_WP_Headings_IDs->prepare_slug(‘Lorem’) #1 /apps/cdlib/apache/htdocs/wp-content/plugins/content-anchor-links/xnau_WP_Headings_IDs.php(96): xnau_WP_Headings_IDs->make_slug(‘Lorem’) #2 [internal function]: xnau_WP_Headings_IDs->place_ids(Array) #3 /apps/cdlib/apache/htdocs/wp-content/plugins/content-anchor-links/xnau_WP_Headings_IDs.php(80): preg_replace_callback(‘%<(?<tag>h[2-6]…’, Array, ‘<h2>Lorem</h2>\r…’) #4 /apps/cdlib/apache/htdocs/wp-content/plugins/content-anchor-links/xnau_WP_Headings_IDs.php(63): xnau_WP_Headings_IDs->add_anchors_to_headings() #5 /apps/cdlib/apache/htdocs/wp-includes/class-wp-hook.php(286): xnau_WP_Headings_IDs::add_heading_ids(‘<h2>Lorem</h2>\r…’, ‘25300’) #6 /apps/cdlib/apache/htdocs/wp-includes/plugi in /apps/cdlib/apache/htdocs/wp-content/plugins/content-anchor-links/xnau_WP_Headings_IDs.php on line 172
]]>Hi – I activated your plugin on my site and did not see any ids added to my headers. Any clues to why this is not happening? I have looked in the HTML and there are no id assignments either for any headers.
Thanks, Mike
]]>