OpenByt – Your Ultimate Source for Free WordPress Knowledge

How to Create a Vertical Sticky Sidebar in Elementor for Seamless Page Navigation

A vertical sticky sidebar is a practical design element positioned on the side of the page that remains visible within the viewport as users scroll down. This fixed-position sidebar can be an efficient tool for guiding visitors through your content by allowing quick access to specific page sections. For websites with extensive information, such as service pages, portfolios, or blog posts, a sticky sidebar improves user experience by offering a convenient navigation tool, making it easier for users to jump to desired sections without needing to scroll extensively.

This tutorial will guide you through creating a vertical sticky sidebar in Elementor with navigation items, anchor links, and custom styling to match your website’s aesthetic.

Preparation

Before you start, ensure the following:

  1. Elementor Pro Installed and Activated: The sticky effect requires Elementor Pro.
  2. Page Setup: Either a new or existing page where you want to add the vertical sticky sidebar.
  3. Familiarity with Elementor Containers: We recommend working with Flexbox Container mode for more flexible control for this tutorial.

Step 1: Create a Single Page Template

We’ll begin by creating a single page template and setting it up to house the container that will serve as our vertical sticky sidebar.

  1. Navigate to Templates

In your WordPress dashboard, go to Elementor > Templates > Add New.

  1. Select Template Type

In the popup, choose Single Page as the template type and give it a name, like “Business Service Page Template.”

  1. Choose Page Type

At the top of the template library, select the Pages tab.

Browse the available templates to find a suitable style. You can use the search bar to find templates for specific purposes, such as “Services” or “Company.” If you’re creating this sidebar for a particular type of page, you may also configure conditions in the display settings to limit its appearance to specific pages.

You can choose whether to insert an existing template and if you need to add side sticky navigation to one of your pages, you can edit the page directly.

Step 2: Create the Container in Elementor

This container will serve as the base for the vertical sticky sidebar.

  1. Add the Container

In the page editor, click Add New Container and drag it into your design area. This container will act as the main structure for the sticky sidebar.

  1. Set the Container Direction

Select the container, then set its direction to Vertical in the settings panel on the left. A vertical direction allows the sidebar items to stack from top to bottom, which is essential for creating a vertical sidebar layout.

  1. Define Container Width

In the Style tab, adjust the width to fit the sidebar’s needs, such as 200px or less, depending on your design preferences. Ensuring it takes up minimal space on the page helps maintain focus on the main content.

Step 3: Create the Vertical Sticky Sidebar

  1. Insert Title and Navigation Items

Add a Heading widget inside the container with a title like “Quick Navigation” or “Contents.”

  1. Add List Items

Insert an Icon List or Button widget below the heading to create navigation items. Here, we’ll use an Icon List for a streamlined look, allowing space between each item in the sidebar.

  1. Add Navigation Links

For your sidebar navigation, add items such as:

Customize names and icons as desired to reflect your page layout. Delete the icon or go to the icon gallery to select it.

  1. Set Anchor Links

Add anchor links to each navigation item by setting up anchor points on the page. For example, for an “About Us” section, we’ll use #about-us, and similar anchors for other sections.

Add an Anchor for “About Us”

In Elementor, find the Menu Anchor widget. Drag it just above the title for the “About Us” section or to any appropriate position. Name the anchor (for example, about-us) in the settings for easy linking later.

Link the Anchor to Navigation

Return to the Icon List item for “About Us” and link it by setting the URL as #about-us. Users clicking on this navigation item will immediately jump to the section.

Repeat this process for the remaining menu items.

  1. Define Sidebar Width

To maintain a consistent layout, set the width of both the Icon List container and the main container to a fixed value, such as 200px.

  1. Customize Sidebar Style

You can adjust the font, colors, and spacing in the Style tab to match your site’s style. You may also add a background color, padding, and shadow effects to make the sidebar visually distinct.

Step 4: Enable Sticky Effect

To keep the sidebar fixed as the user scrolls, follow these steps:

  1. Setting CSS ID for the navigation bar and content area

Select the navigation bar container, and in the Advanced tab, add a CSS ID; for example, set the ID to the sidebar-menu.

Open Custom CSS in Elementor (a global setting or custom CSS for the navigation bar container). Add the following code:

#sidebar-menu {
    position: fixed; /* Fixes the sidebar in place, so it doesn’t move when scrolling */
    left: 0; /* Aligns the sidebar to the left side of the page */
    top: 0; /* Positions the sidebar at the top of the page */
    height: 100vh; /* Sets the sidebar height to the full viewport height */
    width: 200px; /* Adjusts the width of the sidebar as needed */
    z-index: 10; /* Ensures the sidebar stays on top of other elements */
    background-color: #e0f7fa; /* Sets the background color of the sidebar */
    color: #FFF; /* Sets the text color inside the sidebar */
    padding-top: 250px; /* Adds padding at the top of the sidebar */
    overflow-y: auto; /* Allows scrolling if the sidebar content is too long */
}

Explanation

A vertical sticky sidebar is a design element that remains fixed on the side of a webpage as users scroll, providing quick navigation to specific sections. This tutorial guides you through creating a sticky sidebar in Elementor, using navigation items, anchor links, and custom styling for a seamless user experience. With Elementor Pro installed, you’ll create a single page template, set up a container for the sidebar, add navigation items, and assign anchor links. Finally, by adding custom CSS, the sidebar stays fixed in the viewport, enhancing accessibility on content-heavy pages, such as service or portfolio sections.

Exit mobile version