A website that isn't on Shopify can place the menu exactly where you want with a code snippet that you paste straight into the page. You don't need to know CSS Selectors.
Before you start: your website must already connect to Navi+ with the snippet in the head tag (see Wix, WordPress, and other websites). The snippet below is the second one, which sets the placement.
1Copy the menu's snippet
Open the menu, go to the Publish step, scroll to the Method 2: Insert the code snippet anywhere on your website where you want the menu to appear card, then click Copy.
token: "TOKEN_CUA_BAN",
embed_id: "MA_MENU"
});</script>
<script src="https://live.naviplus.app/start.js" async></script>Menu snippet
2Paste it where you want the menu
In your website editor, add an HTML block where you want the menu (for example, right below the header), then paste the snippet into it. Save, then publish the page again.
3Check the page
Open the page on your live website. The menu appears where the HTML block is, and you're done. If it doesn't show, see The menu doesn't show.
More to know
How do the two code snippets differ?
- Snippet in
head: contains only your store’stoken. Paste it once for the whole website to connect Navi+ to every page. Use it for Webflow, Squarespace, and custom-built websites. WordPress already connects through the plugin, so it doesn’t need this snippet. - Spot snippet (Method 2): also contains an
embed_id, a separate code for each menu. The menu appears wherever you paste it, and you can paste it in as many places as you need.
Your token is unique to your store, so don’t post it in public.
Code snippet or CSS Selector?
- Code snippet: a good fit when your website editor lets you paste an HTML block exactly where you want the menu.
- CSS Selector: a good fit when you want to replace or insert the menu around an existing element, such as the main menu or header. See Navi+ Live: pick a spot.
WordPress and Wix
- WordPress: the plugin already connects Navi+ to your website, and there’s a simpler way to place the menu than a long snippet: a shortcode, described in the expandable section below. Method 2 still appears so you can paste the snippet into your page builder’s custom HTML block. The WordPress snippet includes the line
env: "wp". Copy it exactly as shown in Publish. - Wix: Navi+ connects to your website automatically, and Publish doesn’t show Method 2. Place the menu with a CSS Selector from the built-in selector table. See Navi+ Live: pick a spot.
WordPress: place the menu with a shortcode
The Naviplus Menu Builder plugin gives you a short code (a shortcode) that places the menu anywhere on the page, so you don’t need to copy the long snippet:
[naviwp embed_id="SF-123456789"]
Which menu types use it? Menus placed at a spot: Desktop Mega Menu, Top Tab Bar, and Category Grid. The Bottom Tab Bar, Floating Button, and Hamburger Menu don’t need a shortcode. They show on their own while the Embed Navi+ Menu Builder into website switch is on.
Where do you get the shortcode?
- Go to Appearance > Naviplus Menu Builder, and find the menu in the Your Menus table. The
embed_idappears right below the menu name. - Click the ··· button at the end of the row, then choose Copy shortcode.
Where do you paste it?
- A Shortcode block, or a Paragraph block, in the block editor. The plugin recognizes a shortcode pasted into a paragraph.
- A text widget, or a block in the theme’s widget area.
- A Shortcode block or field in your page builder (such as Elementor).
The menu appears wherever you paste the shortcode. You can paste it in more than one place, with one menu for each spot.
Notes:
- The plugin has no block named Naviplus. Don’t look for one. Use the Shortcode block instead.
- The older shortcode format
[naviplus embed_id="..."]still works. - The shortcode still shows the menu when the Embed Navi+ Menu Builder into website switch is off.
- Can’t add a block to your header? Use a CSS Selector so Navi+ inserts the menu after the header.
- To stop a menu from showing, delete the shortcode from the page, or turn off the menu in the Publish step.
The menu doesn't show after I paste the snippet
Check that you pasted the snippet exactly as copied, with no lines missing. Check that the snippet in head is in place (see Wix, WordPress, and other websites), and that you published the page again. If it still doesn’t show, see The menu doesn’t show.