Linux 软件免费装
Banner图

Demfilz Advanced Menus

开发者 demfilz
更新时间 2026年10月10日 06:28
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

mega menu mobile menu navigation sticky header menu icons

下载

1.0.2

详情介绍:

Your theme's menu, upgraded. Advanced Menus adds the things people always end up wanting from their navigation, and it does it inside Appearance > Menus, on the items you already have. No page builder, no theme lock-in, no new admin screens to learn. On every menu item Mega menus Tick "Mega menu" on a top level item and its child items become columns. Each column is a heading with the third level as its links, or one of these instead: Panels can be full width, the width of the menu, or fit their content. Columns can span two, three or four tracks. Below the mobile breakpoint the panel becomes a plain nested list, so nothing is lost on a phone. Item types Turn a custom link into a search form (inline, or an icon that expands, with live results as you type), a cart link with a live count and a dropdown mini cart, an account link that becomes a menu of account pages once signed in, a block of custom content, or a divider. A "no link" option turns any item into a heading. Mobile drawer A slide in drawer built from any menu, from the left or the right, with accordion submenus, an optional search box, and account and cart links. Open it from a floating button, from your theme's own menu button (enter its selector and the theme menu is replaced), from the [demfilz_menu_button] shortcode, from the block, or from any element carrying the attribute data-dadm-open. Focus is trapped inside while it is open, Escape closes it, and focus returns to the button. Sticky header Give it a CSS selector and the header stays on screen while scrolling. A placeholder stops the page jumping, the admin bar is accounted for, a shrink class is added after a short scroll, and it can be desktop only. Colours and shape, live Panel colours, accent colour, corner radius, shadow, font size and a light, dark or automatic colour scheme are in the Customizer with an instant preview. Place menus anywhere The "Advanced Menu" block, the [demfilz_menu] shortcode and the "Advanced Menu" widget render a horizontal bar, a vertical list, or a drawer button. Built properly

安装:

  1. Upload the plugin folder to /wp-content/plugins/, or install it from Plugins > Add New.
  2. Activate it.
  3. Open Appearance > Menus. Every item now has an "Advanced Menus" panel: click "Options" to set an icon, a badge, visibility rules or mega menu settings. Save the menu.
  4. Open Appearance > Advanced Menus for the drawer, the sticky header, search and behaviour settings.
  5. Open Appearance > Customize > Advanced Menus to change the colours with a live preview.

屏幕截图:

  • A full width mega menu on a standard theme: a links column, a featured products column with prices and an image column.
  • The mobile drawer on a phone: the same menu as an accordion, product cards included.
  • Visibility rules on an item: login state, roles, device and a date window.
  • The settings screen: theme menus, behaviour, off-canvas drawer, sticky header, search and tools.
  • The Customizer section with a live preview of the colours and shape.
  • Live search from the menu bar: pages, posts and products with thumbnails and prices as you type.

升级注意事项:

1.0.2 Hardening of the output buffers around the drawer hooks and the mini cart. 1.0.1 Fixes from a pre-release review: depth limited menus, posts column category, live cart count, block alignment, accessibility and drawer polish. 1.0.0 Initial release.

常见问题:

Does it work with my theme?

It works with any theme that prints its menus with the standard wp_nav_menu() function, which is nearly all of them. The plugin adds to the menu through WordPress filters; it does not replace the theme's markup. If a theme uses a custom menu walker that skips those filters, use the block, shortcode or widget to render the menu instead, or the drawer for mobile.

I use a block theme and there is no Appearance > Menus.

The plugin switches that screen on for block themes. Build the menu there, then place it with the "Advanced Menu" block in your header template part, or enable the drawer, which works with every theme.

My theme already has a menu button on phones. Do I need two?

No. Under Appearance > Advanced Menus > Off-canvas enter the selector of the theme's button (for example .menu-toggle) in "Reuse the theme's menu button" and switch the floating button off. Taps on the theme's button then open the drawer.

How do I build a mega menu?

Create the structure in Appearance > Menus: a top level item, child items for the columns, and grandchild items for the links in each column. On the top level item open "Options", the "Mega menu" tab, tick "Mega menu" and save. On a child item choose a column type to show products, posts, an image or custom content instead of links.

Why does my mega menu only show two levels?

Some themes print their menu two levels deep. The plugin lifts that to three levels for menus that contain a mega item (Appearance > Advanced Menus > Integration > Mega menu depth). If the third level still does not show, the theme uses a custom walker; use the block or shortcode for that menu.

Can I show an item only to logged in users?

Yes. Open the item's "Visibility" tab and choose "Logged in users". Tick roles to limit it further. "Logged out visitors" does the opposite, and the date fields show an item only between two dates. Login and date rules are applied on the server for every menu printed with the standard wp_nav_menu() function, but they only decide what the menu shows: the linked pages stay reachable by URL, so protect private pages with a membership plugin as well.

Where do the icons come from?

They are drawn by the plugin as inline SVG and shipped with it. Nothing is loaded from a font service or a CDN. You can also pick any image from the media library, and developers can add icons with the dadm_icons filter.

How do I add the mobile drawer to my header?

Enable the drawer under Appearance > Advanced Menus > Off-canvas and choose a menu. The floating button appears on its own. To put a button in your own header, add the attribute data-dadm-open to any element, use the [demfilz_menu_button] shortcode, or add the "Advanced Menu" block set to "Drawer button".

How do I make my header sticky?

Under Appearance > Advanced Menus > Sticky header, enable it and enter the CSS selector of your header, for example #masthead or header.site-header. Right click the header in your browser and choose Inspect to find its id or class.

Does it need WooCommerce?

No. Without WooCommerce, cart items are hidden, product columns show a short note, and the account item links to the WordPress login and profile pages. With WooCommerce you get the cart count, the mini cart, product columns and account endpoints.

Does the live search expose anything private?

No. The search endpoint returns only published, public, non password protected content, the same content a visitor could find with the normal site search. Results are capped at the number set in the settings.

Does the plugin send data anywhere?

No. There are no external services, no tracking and no outbound calls.

更新日志:

1.0.2 1.0.1 1.0.0