WordPress add class in wp_nav_menu ul li links

11.79K views
no comments
22 Feb 2018 11:42 pm

Its hard for peoples who don’t know more about programming how they call a wp_nav_menu_walker to manipulation wp_nav_menu data, here is I am telling you easy way to add your custom class in wp_nav_menu’s link.

Go to Media from WP-Admin, At the top of page you will see screen options

 

Go to Media from WP-Admin, At the top of page you will see screen options

 

Check the CSS Classes box, You will see the CSS Classes (optional) field in when you click on your menu link. see below figure, you will need to add your custom class in that field I have added my custom menu named “SDTUTS_CSS_CLASS” and click save menu button.

 

add class in wp nav menu screenshot-2

 

open your website page where you have called that menu you will see menu class your link.

 

add-class-in-wp-nav-menu-screenshot-3

 

NOTE:Your Email Address will be not shown and please do not add spamming comments because here is REL="NOFOLLOW" on your links and comments also moderated shown.
<code>Put html css or any language code under this tag</code>