What if you want to have a clickable thingy (button or link or menu item) that goes to a specific place on a web page instead of positioning it at the top? Here are the simple steps:
- Place the cursor at the point where you want the link to position the page; best on the left edge of the first line of a text thingy or on a blank line above an image or table or shortcode
- Drop an anchor (Classic Editor: Insert→Anchor; Block Editor see below) and give it an Id (short label, no spaces, dashes instead); the anchor will be invisible when the page is displayed; let's say you chose the Id my-id
- Create a button or link or menu item:
- If the thingy us on the same page, the URL would simple be #my-id
- Otherwise, it would be the usual URL for the page with #hotnews appended, e.g. https://example.com/pagename#hotnews
- Note: the # prepended to the Id tells the browser, "on the page, go here"
Same Page Use Case
You have a long page. All that scrolling makes it hard to find stuff. You create a row of links at the top of the page that jump to the various parts of the page (you might separate them with a vertical bar | with a space on either side). A sort of clickable table of contents.
You have a long page. All that scrolling makes it hard to find stuff. You create a row of links at the top of the page that jump to the various parts of the page (you might separate them with a vertical bar | with a space on either side). A sort of clickable table of contents.
Here's an example:
Drop an Anchor with the Block Editor
- Select the Block: Choose the block you want to link to (e.g., a heading, paragraph, image)
- Access Block Settings: In the right-hand sidebar, click on the "Settings" tab (gear icon)
- Locate "Advanced" Section: Expand the "Advanced" section within the block settings
- Enter HTML Anchor: In the "HTML Anchor" field, type a unique, descriptive name for your anchor (e.g.,
section-title,image-gallery). This name should be unique on the page and typically uses hyphens instead of spaces.
