HTML anchor in header is overwritten

Posted in: Newspaper
Post count: 40

Hello,
I am setting an HTML anchor to the header: https://prnt.sc/iCOWl4rVSEw1
I can successfully find and set the anchor link in any other place of the text: https://prnt.sc/h7fZ5YdP0bAX
However, after I publish the page, there is no id with the anchor. The id is overwritten by the header’s name as per the third screenshot: https://prnt.sc/hGaDuZdI-3xK

If I set the anchor to a normal paragraph, everything works fine. This only happens when I try to link to the header.

Can you tell me if this is something to do with the Newspaper theme or some other plugin is doing that?

  • This topic was modified 3 years by Sergey.
  • This topic was modified 3 years by Sergey.
Post count: 21065

Hello @watashi314 !

It is a Gutenberg feature and not part of our theme.

Thank you!

Post count: 40

I searched support forum of Gutenberg and found a message where they say that it is not behaviour of Gutenberg: https://wordpress.org/support/topic/html-anchor-tag-auto-populating-for-headings/.

In that thread the customer also pointed out to Yoast SEO plugin that created this problem. So, I contacted Yoast SEO support, and they told me to try to switch the theme to identify whether it is a problem of Yoast SEO or of my theme.
https://wordpress.org/support/topic/anchor-id-in-header-is-overlapped-by-header-name/.

So, I tried to switch the theme from Newspaper to Twenty Twenty-Two. And the issue has gone. Custom anchor ID appeared in the HTML text of the page.
When I switched back to the Newspaper theme, the anchor has gone again.

Do you still think it is not a problem of Newspaper theme?

Post count: 21065

Hello @watashi314 !

We would like to investigate this issue.
Please contact us via email at contact@tagdiv.com and provide the following:
– admin url and credentials
– a link to this topic in order to identify you

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.