Home > CMS Tutorial > WordPress > body text

How to classify navigation in WordPress

藏色散人
Release: 2019-07-18 09:56:36
Original
3256 people have browsed it

How to classify navigation in WordPress

How to add navigation classification in wordpress

##How to add and display navigation classification menu in wordpress:

Find the WordPress backend>Appearance>menu and add a menu. The order of the added menus is as follows:

● First define a separate menu.

● Then assign this menu to a theme location.

● The next step is to add and configure menu items.

Then we go to the display menu of the theme and use the following wp_nav_menu() to display the menu just defined. Of course, the wp_nav_menu() function can have very detailed parameters, but it can be used simply here. , may only be used in special circumstances.

Stylized navigation menu

Stylized navigation menu is very simple, you only need to define the two classes current-menu-item and current-menu-parent That’s it. For example:

#menu-nav li.current-menu-item, #menu-nav li.current-menu-parent, #menu-nav li:hover {
background:#1BA6B2;
text-decoration:none;
position: relative;
}
Copy after login

Then define the display and layer effects of menus at all levels.

For more WordPress technical articles, please visit the

WordPress Tutorial column!

The above is the detailed content of How to classify navigation in WordPress. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!