How to display different menus on different pages with Astra theme?

Have you ever thought about displaying different menus on different pages, in fact it is a common need to display different navigation menus depending on the content of the page. For example, a home page may require a streamlined menu, while a product page or landing page may require a more focused navigation structure. Use the Astra When the theme, it is very easy to set up different menus for different pages without you writing any code.

图片[1]-Astra 主题设置不同页面菜单的三种方法

In this article, we will introduce three implementations for different usage scenarios.

Method 1: Using Astra Pro's Page Headers module to set up different menus

This is the most straightforward approach for when you want to change the main menu on certain pages without installing additional plugins.

The steps are as follows:

  • Installation and activation Astra Pro plug-in (software component)
  • Go to Dashboard, Astra > Astra Pro Modules, Enable Page Headers Module
图片[2]-Astra 主题设置不同页面菜单的三种方法
  • To create a new Page Header, click "Add New" and name it
图片[3]-Astra 主题设置不同页面菜单的三种方法
  • Switch to Site Header tab, select the Primary Menu you wish to use
图片[4]-Astra 主题设置不同页面菜单的三种方法
  • exist Display Rules Select the page or article to which you want to apply the menu in the
图片[5]-Astra 主题设置不同页面菜单的三种方法
  • Click Publish and setup is complete

Once set, the selected page will automatically load the menu you specify, while other pages are not affected.

Note: This method only applies to replacing the main menu, not to other content in the header, such as buttons, widgets, etc.

Method 2: Create a custom header using Astra Pro's Site Builder

If what is needed is not just a menu change, but a change in the style and content of the entire header, such as switching the logoYou can add special buttons, etc., using the Astra Pro The Site Builder module builds a separate set of headers and sets them to display on specific pages.

This approach is suitable for pages that require a greater degree of design freedom, such as branding pages and promotional pages.

Method 3: Use Conditional Menus plug-in

If the site has multiple menus and you want the flexibility to switch menus between pages, you can use the free Conditional Menus PluginThe

Steps to use:

  • Install and enable in the backend Conditional Menus Plugin
图片[6]-Astra 主题设置不同页面菜单的三种方法
  • leave for exterior condition > menuSelect the menu where you want to set the conditions
图片[7]-Astra 主题设置不同页面菜单的三种方法
  • strike (on the keyboard) Manage Locations
图片[8]-Astra 主题设置不同页面菜单的三种方法
  • Add display conditions to select which pages to display the currentmenu
图片[9]-Astra 主题设置不同页面菜单的三种方法
  • After saving the settings, the menu will dynamically switch according to different pages

This method is particularly suitable for the need to frequently switch across multiple pages of the menu, flexible settings, simple operation.

summarize

Whether it's the home page, landing page, or some special service page, different menu structures can help visitors find what they need faster. On the Astra There are three common implementations in the theme:

  • Page Headers Module: suitable for quick replacement of the main menu
  • Site Builder Module: suitable for setting the entirefootertype
  • Conditional Menus Plugin: suitable for situations where there are multiple menus that need to be switched on a page-by-page basis

Choosing the right way according to the actual usage scenario can make website navigation clearer and more efficient.

Related articles


Contact Us
Can't read the tutorial? Contact us for a free answer! Free help for personal, small business sites!
客服微信
Customer Service
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: [email protected]
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
本文作者:托尼屎大颗
THE END
If you like it, support it.
kudos337 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments