Add .first & .last CSS class to WordPress Navigation Menus

When designing a WordPress theme you may want to add some .first and .last css classes to your WordPress navigation menus for styling purposes. This tutorial will show you how to acheive that by placing some filter code into your themes WordPress functions.php file that will modify all your menu items through “wp_nav_menu_objects” by adding .first and .last CSS classes allowing you to style menu items easily.
Continue reading “Add .first & .last CSS class to WordPress Navigation Menus”