askvity

What is an Anchor Tag in Elementor?

Published in Elementor Navigation 6 mins read

An anchor tag (also known as a jump link or a menu anchor) in Elementor allows you to create a clickable link that, when activated, navigates users to a specific section or element on the same page, or even a different page. This greatly enhances user experience, especially on long-form content pages.

An anchor tag in Elementor is essentially an invisible marker you place on your page. When you create a link that points to this marker, clicking the link will smoothly scroll the user's browser window directly to the designated section. This is particularly useful for table of contents, "back to top" buttons, or direct navigation to key information.

Step-by-Step Guide: Adding an Anchor Tag in Elementor

Adding an anchor tag in Elementor is straightforward, primarily utilizing the Menu Anchor widget.

Step 1: Access Your Page in Elementor Editor

First, you need to be in the Elementor editor for the page where you want to add the anchor.

  1. Login to your WordPress website.
  2. From your WordPress dashboard, navigate to Pages > All Pages.
  3. Hover over the page you wish to edit and click "Edit with Elementor." This will open the Elementor editor for that specific page.

Step 2: Locate the Menu Anchor Widget

Once inside the Elementor editor, you need to find the specific widget designed for creating anchors.

  1. In the Elementor panel (usually on the left side), use the search bar.
  2. Search for "Menu Anchor." The widget icon will appear.

Step 3: Place and Configure the Menu Anchor Widget

This is where you define the anchor itself by giving it a unique ID.

  1. Drag and drop the Menu Anchor widget from the Elementor panel to the exact section or just above the element on your page where you want the link to jump to. The widget itself is invisible on the front end, so its placement is purely for defining the destination.

  2. After placing the widget, go to the Content tab in the Elementor panel.

  3. In the "Menu Anchor" field, enter a unique ID for your anchor. This ID should be lowercase, descriptive, and contain no spaces or special characters (hyphens are acceptable).

    • Example IDs: about-us-section, pricing-table, contact-form.

    This ID is crucial, as it's what you will use to link to this specific point on your page.

How to Link to Your Elementor Anchor Tag

Once you've placed and configured your Menu Anchor widget with its unique ID, you can create links to it from various elements.

Linking from Within the Same Page

To link to an anchor on the same page, use the hash symbol (#) followed by the anchor ID.

  • In a Menu Item: Go to Appearance > Menus in your WordPress dashboard. Create a custom link menu item. In the "URL" field, type #your-anchor-id (e.g., #about-us-section). The "Link Text" will be what your users see.
  • In a Button Widget: Drag a Button widget onto your Elementor page. In the "Link" field under the Content tab, enter #your-anchor-id.
  • In a Text Editor Widget (or any text link): Highlight the text you want to make a link. Click the "Link" icon in the text editor toolbar. In the URL field, enter #your-anchor-id.

Linking from a Different Page

To link to an anchor on a different page, you need to use the full URL of the page followed by the hash symbol and the anchor ID.

  • Example: If your page URL is https://yourdomain.com/services/ and your anchor ID on that page is our-offerings, the link would be:
    https://yourdomain.com/services/#our-offerings

Best Practices for Using Anchor Tags

  • Unique and Descriptive IDs: Always use unique IDs per page. Make them descriptive so you know what section they refer to.
  • Lowercase and Hyphens: Stick to lowercase letters and use hyphens (-) instead of spaces for multi-word IDs (e.g., product-features not Product Features).
  • Avoid Special Characters: Do not use special characters like !, @, #, $, etc., in your anchor IDs.
  • Contextual Placement: Place the Menu Anchor widget immediately above or within the section you want users to land on.
  • Consider Fixed Headers: If you have a fixed header, it might cover the anchored section. You might need to add some padding above the anchor point using CSS or adjust the anchor's position slightly to compensate.
  • Test Thoroughly: Always test your anchor links on different devices and browsers to ensure they work as expected.

Benefits of Using Anchor Tags

  • Improved User Experience (UX): Allows users to quickly jump to relevant content, saving them from endless scrolling.
  • Enhanced Navigation: Creates a smooth, intuitive browsing experience, especially on single-page websites or long articles.
  • SEO Advantages: Google can recognize jump links and sometimes display them directly in search results, offering users a quick way to specific content on your page.
  • Content Accessibility: Helps users with specific needs or those on mobile devices navigate efficiently.

Quick Reference Table: Adding an Anchor Tag

Step Action Details Example
1 Access Elementor Editor Log in to WordPress, navigate to Pages, and click "Edit with Elementor." N/A
2 Search Widget In Elementor panel, search for "Menu Anchor." Menu Anchor
3 Place Widget Drag "Menu Anchor" widget to target section. Drag & Drop
4 Set ID In Widget Settings (Content tab), enter a unique, lowercase ID. about-section
5 Create Link Use #your-id for same-page links or yourdomain.com/page/#your-id for external links. #about-section or mydomain.com/contact/#form

By following these steps, you can effectively implement anchor tags in Elementor, creating a more navigable and user-friendly website.

Related Articles