Add product categories to menu in woocommerce
WordPress
comes with a wonderful and easy to use menus functionality, letting you
quickly create a custom menu and place it in your theme’s supported
menu areas or even in a widgetized area with the menus widget. By
default WordPress, and our themes, will start by adding all of your
pages to the default navigation menu. You can then customize your menuin all our themes by going to Appearance > Menus.
The WordPress menus functionality is well documented on the WordPress codex .
Adding Links
Here’s
a general overview of a menu we’ve created for our theme Canvas. We’re
working on our main (primary menu), if you haven’t created a menu yet
you will be prompted to create one before being able to add pages, etc…
to your site’s navigation. You can create as many menus as you’d like as
well. For our example we have two menus on our Canvas demo, a main menu
and top menu. Two popular locations for site navigation menus.
In
the left hand column is a list of all your pages, as well as custom
post types, categories, tags, etc… You can then select certain pages, or
products, or categories and add them to the menu you are creating. For
example, using WooCommerce and creating a category menu is a common use
of adding a category to your navigation.
Creating Drop Down Menus
Once
an item is added to a menu, those menu items can be rearranged. Placing
the mouse cursor over the menu item title, when the mouse cursor
changes to 4-arrows, hold the left-mouse button down, drag the module to
where you want to place it, then release the mouse button (this is
called drag-and-drop).
To create a drop down item drag a menu item slightly to the right of the menu item above it to create a hierarchy (parent/child) relationship in the menu.
Adding A Home Link
Adding
a “Home” link to your menu is useful if you want to give users quick
access back to your front page, or if you have set a static page as your
front page, and want a “Home” item in your menu. The logos in our
themes are also links to your home page, but this helps some users with a
specific link saying home.
To add a “Home” link, click View All under the Pages panel.
Managing Locations
It’s
up to the theme developer to decide how many menu locations a theme
should have. Again, in our example using Canvas we have two menu
locations: Primary Menu for your main menu, and Top Menu as an
additional option. Your theme may not have the same location names or
number of locations. Regardless, there are two easy ways to assign a
menu you just created to a menu location.
While
creating or editing your menu, you can assign it’s location at the
bottom of the menu. There is also a Manage Locations tab where you can
assign all locations a menu from one screen. Helpful if your theme has
many menu locations.
Adding Product Categories
To add Product Categories to your menu, you might need to enable them first in the Screen Options.
Comments
Post a Comment