Hello,
I understand that you are facing an issue with HTML duplicate id attributes on the Table of Contents (TOC) while using Rank Math for SEO on your website. This issue can arise due to conflicts between plugins or themes on your site.
To resolve the duplicate id attribute problem on the TOC, you can follow these steps:
-
Install the Health Check and Troubleshooting plugin by going to WordPress Dashboard → Plugins → Add New and then activate it.
-
Enable Troubleshooting Mode by navigating to Tools → Site Health → Troubleshooting and clicking on Enable Troubleshooting Mode.
-
Enable Rank Math by going to Plugins → Installed Plugins and clicking on Enable while troubleshooting under Rank Math SEO and Rank Math SEO PRO.
Following these steps should help you identify and resolve any conflicts causing the duplicate id attribute issue on the TOC. If you need further assistance, please let us know.
Thank you for bringing this concern to our attention.
Sources:
Why Isn’t Rank Math Detecting the Table of Contents? » Rank Math
How to Fix Duplicate Meta Tags » Rank Math
How to Add Rank Math’s Table of Contents Block » Rank Math
How to Add Rank Math’s Table of Contents Block » Rank Math
I have followed the step you have specified but didn’t get any issues. It seems Rank math generating two duplicate ID attribute:
<div class=”wp-block-rank-math-toc-block” id=”rank-math-toc” id=”rank-math-toc”><h2>Table of Contents</h2><nav>
</nav></div>
Hello,
Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.
We want to look at the issue you are currently facing using Rank Math.
Can you please share your website URL with us so that we can investigate the issue further?
To help you investigate this issue further, we might need to take a closer look at your website and settings. Please follow these steps:
- Edit the first post on this ticket and include your WordPress and FTP logins in the Sensitive Data section. This is a secure section that only our support staff can access.
- Make sure you take a complete backup of your website before sharing the information with us.
- If you prefer, you can use this plugin to generate a temporary login URL to your website and share that with us instead: https://wordpress.org/plugins/temporary-login-without-password/
- You can also use this plugin to monitor what changes our staff might make on your website (if any): https://wordpress.org/plugins/wp-security-audit-log/
We appreciate your cooperation and patience.
Thank you for choosing Rank Math.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.