Home » Web Tutorials » WordPress » How to Add Buttons to Top Navigation in Astra Theme?

How to Add Buttons to Top Navigation in Astra Theme?

Astra is one of the most popular WordPress themes, with more than 1 million active installations for the free version. Although it is easy to create a website with Astra theme and customize it with Astra Pro add-on, many users do not use the theme to its full potential. Adding a button to the top navigation is one such example; many users add buttons to the sidebar instead because they do not know how to add them to the navigation.

Why Use Top Navigation Buttons?

Here are some reasons to use a button in the navigation menu:

  • Create a consistent call to action across your site. You can add single or multiple buttons and customize them
  • Add register and login buttons for easier access. Create colorful, eye-catching buttons that attract clicks.
  • Offer coupons, deals, or other announcements with text / button and control visibility based on the device.

There are multiple ways to add button to top navigation in Astra theme.

Astra Theme Offer

Astra Theme

Get the most popular WordPress theme to build your site with complete suite of tools and grow your business online.

1. Adding Button Using Preset Header

  • Log in to your WordPress admin panel and navigate to “Appearance > Customize” or “Astra > Customize” section.
  • Go to “Header” section to open the Header Builder.
  • Click the pencil icon next to “Header presets” heading (below the “Elements” tab).
  • You will see a list of presets; select the one with a button at the right end.
Select Header Preset with a Button
  • Hover over the button and click the pencil icon or use Shift + click to edit its content.
  • You can change the button text and link, add link attributes (like nofollow, noreferrer, and noopener), and set the link to open in a new window.
  • Click the “Size” dropdown and select one of the predefined values, from Extra Small to Extra Large.
  • Under “Visibility”, uncheck Tablet and Mobile to hide the button on those viewports.
Customize Button Text and Link
  • Go to “Design” tab and adjust the text color, background, border, padding, and margins if required.
  • Once done, click the “Publish” button to make the changes live.
Customize Button Design

2. Manually Adding and Customizing Buttons

If you do not want to use preset headers, you can add a button manually. This is recommended because you can add multiple buttons without disturbing the navigation setup.

  • Go to “Appearance > Customize > Header”.
  • You should see the Header Builder at the bottom of the content area. If not, click the “Show Builder” option in the bottom-right corner to reveal it.
  • Click the + icon in the column where you want to insert the button (or simply click the column if you do not see the + icon).
  • You will see a list of elements; select “Button 1”. If you want to add another button, select “Button 2” as well.
Add Buttons in Astra Navigation Menu
  • Click the inserted element to customize its text, link, size, and visibility.
  • Click “Publish” to apply the changes.
Customize Multiple Buttons in Navigation

3. Adding Top Notification Bar with Button

To make the most out of button element, add some text and display it as a notification bar. For example, you can offer a special discount or a product launch notice with small text and a button below or above the top navigation.

  • Go to “Appearance > Customize > Header”.
  • Depending on your setup, you will see multiple rows and columns in the Header Builder. Generally, you will see three rows and three columns, and the middle row is your primary header with the logo and top navigation menu.
  • Click the + icon in the center column of the bottom or top row, depending on whether you want to show the notification bar below or above the navigation.
  • Add “HTML 1” and “Button 1” elements.
  • Click the “HTML 1” element to customize the text, colors, and font size.
  • Similarly, select the “Button 1” element to customize the button text, link, and size.
  • Disable the visibility of both elements on Tablet and Mobile.
  • Preview and publish your changes.
Add Notification Bar in Astra Theme

This notification bar appears site-wide, increasing the possibility of getting more clicks from users.

Final Words

As you can see, the possibilities are endless with the Astra theme without any third-party plugins. All you need is a few minutes to explore and understand the features and use them whenever needed. You can remove the buttons and notification bar at any time when you no longer need them.

Leave a Comment

Your email address will not be published. Required fields are marked *