Create Anchor Links Manually with WordPress Block Editor
PreviousUsing Headless WordPress with Next.js and VercelNextCreate post-format Video, Audio, and Gallery
Last updated
Last updated
An anchor link is a link that allows you to jump to a specific section on a page. To create an anchor link in the WordPress block editor, you will need to do the following:
In the WordPress block editor, add a heading block and type in your heading text.
In the heading block settings (found on the Advanced tab of the Headings Block), add an HTML ID to the Heading field. This will be used as the anchor link target.
Once the ID for the heading element is set, we can select some text and add a hyperlink. Instead of a web address, we can add a pound sign (#) plus our element ID. Press enter and the link will apply to that text.
Save your changes and preview your page to test out your new anchor link.