I’m going to start by saying something similar to Horttcore..
Is there a reason you can’t simply provide a differing container element for the given menu, it should provide enough specificity to style it uniquely.
Although, you could do something like this to conditionalise menu args based on the menu’s location..
function my_wp_nav_menu_args( $args="" ) {
if( $args['theme_location'] == 'your-specific-location' )
$args = array_merge( array(
'container_class' => 'example',
'menu_class' => 'example2'
), $args );
return $args;
}
add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
Above code is based on the example given on the codex page for wp_nav_menu
, and could easily be extended to do any number of things.
http://codex.wordpress.org/Function_Reference/wp_nav_menu
Hope that helps..
Related Posts:
- How to highlight the current page in the nav menu?
- CSS won’t style output of wp_nav_menu() correctly
- Where is definied the theme location for the main menu in a WordPress template?
- Some doubts about WordPress handle the horizontal main menu visualization
- .current_page_ancestor broken in Twenty Eleven
- Why nav_menu_css_class doesn’t work with apply_filters?
- 3 Level Menu Navigation (3rd Level not displaying)
- How do I middle-align my header menu items in WordPress [closed]
- How to highlight current menu bar base on the URL?
- How to define and link full path to css located at a random folder on header.php
- How to add posts to custom menus?
- How to add custom css file in theme?
- CSS not updating in browser when I change it
- Display Menu Name using wp_nav_menu
- Do I actually need to link my theme’s style.css in the theme files
- CSS classes for theme
- Splitting WordPress theme CSS into multiple files, good or bad?
- How do I check if a menu exists?
- How to use logout function on custom menu link?
- How to display wp_nav_menu() conditionally only when not on a 404 page?
- Suggestions for creative use of post format feature, or themes that use them well
- Add class to before_widget for all widgets with a dropdown and a counter
- Add a preview to a WordPress Control Panel
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Problem with registering menus – What to do when other solutions aren’t working?
- Add a #hash to the links in my custom menu
- How can i change menu link when page content empty?
- CSS in child theme not overriding the parent theme [closed]
- Replace Home with image link inside custom header menu
- Move my theme style.css into a folder
- How to keep theme layout the same when admin gray bar is present?
- Enqueued Stylesheets Effecting Admin Styles
- wp_head() not inserting the default stylesheet style.css
- How do I add a post to a menu
- how to change WordPress menu markup/classes
- Writing Clean WooCommerce Styles
- First completely customized theme, where should I start?
- Alterntives to BEM syntax that comply with WordPress coding standards? [closed]
- Best practices: Custom theme sidebar menu – hardcode or widget?
- WordPress default theme css units
- current-menu-item class not working
- How to remove class attributes from custom menu markup?
- enqueue_style is not working
- menu behavior is not as expected
- Part of Menu Item Hidden on Header Menu
- How do the default themes reference style.css?
- which is the best way to customize nav-menu-template.php?
- Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]
- Is it possible to edit the styling of the admin panel from within a custom theme?
- My Admin bar covers my sticky navbar [closed]
- WordPress is adding margins and padding to my custom menu?
- Menu item added in wp_nav_menu_items filter is never highlighted
- multisite: global menu containing network site links?
- What are the Entry classes for?
- Using a page as home, how do I prevent nav from setting both home and page links active?
- How to append to menu items selectively
- How to edit my theme for full width?
- How to add styles set by user in the customizer
- Issue on Adding A Class to Bootstrap Navbar Walker Dropdown
- Show woocommerce categories on my theme menu styling
- How remove render blocking css from wordpress when you build a theme?
- Following Web Performance Optimization techniques to output static and dynamic css
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Displaying icon image for WordPress post formats, is there a cleaner way to do this?
- Internal Stylesheet in WordPress Theme development
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- 3 Level Deep Navigation Menu Not Showing All Levels
- How to Create custom xml file for demo content for custom theme?
- How to rotate every letter in a title
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Broken theme, template is missing
- How to add menù section to my WordPress template?
- Having issue with WordPress wp_enqueue_style
- theme-independent CSS/JS files
- How to modify mobile nav menu text in theme
- Navbar- disable “onClick” drop-down
- Customize Option Framework
- Can’t change theme name
- How to format the first line of a post differently?
- Parent/Child pages
- How to substitute old wordpress menu by wp 3 menu the right way?
- Archives and Categories in Custom Menu
- How to create a robust and logic class naming system in WordPress theme developing?
- Theme: dropdown hover menu not showing up in IE/Edge
- Pages not displaying as sections on static page
- Need help with adding custom wordpress menu and sub-menu
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- How to fix an issue with customizer live preview?
- Fallback dosen’t work when not using ‘menu’ attribute
- WordPress doesn’t recognize submenus as so I can’t style them properly
- Primary Menu Showing All Pages With No Sub-Nav
- Custom CSS no getting applied
- WordPress 3.9 two menus in same position?
- editor style css and page template with and without sidebar
- Why the slideshow is not shown in my theme?
- How can I change the title of the Home link in the navigation bar?
- Custom link color or stylesheets
- How to make navigation a list without a plugin? [duplicate]
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- Image and font support missing in editor when deploying theme remotely