How to assign random ID to headings (h1,h2,h3,h4 exc) in AFC WYSIWYG field?
I need to print content in various languages without using polylang or WPML, so i’ve decided to build ACF WYSIWYG fields, in which i put content in various languages. My post are printed by elementor templates depending on category, so i can use tabs widget to switch between ACF field.
The facts is that i use also TOC widget to anchor various chapters by their headings, but when template prints content, the anchor headings are progressive and the same for all languages.
I’ve managed to solve this manually, writing by myself an ID into <h> tag, in order to let anchors work, but i need to automate this process.
I’ve found some snippets to put into functions.php but only for POST CONTENT, not for ACF fields.