• Resolved kgohil

    (@kgohil)


    Hi,
    Is there any way to stop adding automatic id attributes to headings while add/edit post in dashboard with Yoast premium plugin active?
    I don’t want that feature.
    Thanks,
    Krisha

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @kgohil,

    Thank you for using our product and for reaching out!

    This forum is reserved for supporting the free version of Yoast SEO. As this topic is about a premium plugin, this thread has been marked as resolved per the forum guidelines.

    Please contact our support team for assistance if you have an active premium subscription. How can I get premium support?

    If you do not have an active premium subscription, you can either purchase a subscription or downgrade to the free version.

    • This reply was modified 2 years, 2 months ago by Jeroen Rotty. Reason: fix typo
    Thread Starter kgohil

    (@kgohil)

    Hi ok I somehow found a fix through js
    const removeHeadingIDs = () => {
    const blocks = wp.data.select(‘core/block-editor’).getBlocks();

    blocks.forEach(block => {
    if(block.name == ‘core/heading’ && (block.attributes.anchor)){

    if (block.attributes.anchor.indexOf(‘h-‘) === 0) {
    wp.data.dispatch(‘core/block-editor’).updateBlockAttributes(block.clientId, {anchor:”});
    }
    }

    });
    };
    window.onload = function() {
    removeHeadingIDs();
    };`

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Yoast Premium: Automatic ID attribute to headings’ is closed to new replies.