Adding a link to a dropdown menu in the WordPress Astra Theme is simple and can be done using the built-in WordPress Menu Editor. Here’s a step-by-step guide:
Steps to Add a Link to a Dropdown Menu in Astra Theme:
- Log in to Your WordPress Dashboard
- Go to your WordPress admin panel (e.g.,
yoursite.com/wp-admin
).
- Navigate to the Menu Editor
- Go to Appearance > Menus in the left-hand sidebar.
- Select the Menu to Edit
- If you already have a menu, select it from the dropdown and click Select.
- If you don’t have a menu, click Create a New Menu, give it a name, and click Create Menu.
- Add a Custom Link to the Menu
- On the left-hand side, under Custom Links, enter the URL and link text.
- URL: Enter the full URL (e.g.,
https://example.com
). - Link Text: Enter the text you want to display in the menu (e.g., “My Link”).
- URL: Enter the full URL (e.g.,
- Click Add to Menu.
- Make the Link a Dropdown Item
- Drag the newly added link slightly to the right under the parent menu item. This will indent it, making it a dropdown item.
- For example, if you have a menu item called “Parent,” drag the new link under and to the right of “Parent” to make it a sub-item.
- Save the Menu
- Click Save Menu to apply the changes.
- Assign the Menu to a Location (if needed)
- Scroll to the Menu Settings section at the bottom.
- Check the box for the menu location where you want the menu to appear (e.g., “Primary Menu” for the header).
- Click Save Menu again.
Optional: Customize Dropdown Menu Appearance in Astra
If you want to style or customize the dropdown menu further:
- Go to Appearance > Customize > Header Builder in the WordPress dashboard.
- Select the menu you’re working on and adjust settings like dropdown width, colors, or animations.