Astra主题主菜单(Primary Header)从水平变下拉如何修复?
Fix: Astra Theme Primary Header Changed from Horizontal to Dropdown
I’ve run into this exact issue with the Astra theme before—usually it’s a setting tweak or accidental CSS override that causes the primary menu to switch to dropdown mode on desktop. Here are the most reliable fixes to get your horizontal menu back:
1. Double-check Astra’s Header Layout Settings
This is the most common culprit. Astra’s customizer has granular controls for header behavior:
- Go to your WordPress dashboard → Appearance > Customize
- Navigate to Header Builder > Primary Header (some older versions might label this Header > Primary Menu)
- Look for the "Menu Layout" option—make sure it’s set to Horizontal instead of any dropdown/mobile-style option
- Also verify the Responsive Breakpoint setting. If this is set too high (e.g., 1920px), it’ll trigger the mobile dropdown menu even on large desktop screens. Reset it to the default ~921px if needed
2. Troubleshoot Custom CSS or Plugin Conflicts
Sometimes unintended code or plugin interference breaks the menu:
- Plugin Conflict Test: Temporarily disable all third-party plugins, then refresh your site. If the horizontal menu comes back, re-enable plugins one by one to find the conflicting one.
- Custom CSS Check: Head to Appearance > Customize > Additional CSS and scan for code that forces the mobile menu to show, like:
Delete or comment out any code snippets like this—they’re overriding the default horizontal menu styling..ast-primary-header-bar .main-header-menu { display: none !important; } .ast-mobile-menu-toggle { display: block !important; }
3. Reset Astra Header Settings (Last Resort)
If the above steps don’t work, corrupted theme settings might be the issue:
- First, set up an Astra child theme to preserve your customizations (so you don’t lose other tweaks)
- Go to Appearance > Astra Options
- Find the "Reset Options" section, then choose to reset only Header-related settings (or full theme settings if you’re okay starting fresh—always back up your site first!)
If none of these fix it, make sure you’re running the latest version of Astra—old versions sometimes have menu-related bugs that get patched in updates.
内容的提问来源于stack exchange,提问作者Wardenclyffe
相关产品推荐
相关产品推荐

