Just look at wp_nav_menu
arguments:
<?php
$defaults = array(
'theme_location' => '',
'menu' => '',
'container' => 'div',
'container_class' => '',
'container_id' => '',
'menu_class' => 'menu',
'menu_id' => '',
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'depth' => 0,
'walker' => ''
);
wp_nav_menu( $defaults );
?>
You can use menu_id
argument to set its id
attribute and menu_class
to set its class attribute. You can set containers id/class attributes as well.
Related Posts:
- What is the difference between front-page.php and home.php? [duplicate]
- How important is it to enqueue a theme’s stylesheet?
- Can a theme be built in React?
- Strict Standards Error bootstrap navwalker
- Specify image dimensions
- Adding Action Hooks In Parent Theme For Easier Child Theme Customization
- register_sidebar ignores ‘id’ and ‘class’
- Add colors to existing color palette without replacing it
- Add link option to featured image?
- esc_url not working within add_settings_field callback
- How to hide and content from auto-generated excerpts?
- How to override BuddyPress 3.0 bp-nouveau theme files?
- Which theme foundry has clean coded themes, where code is poetry [closed]
- Default header image does not display
- Same footer on all multisites blogs
- A guide or tool for inserting bootstrap in underscores theme? [closed]
- New template, where to place CSS?
- .sub-menu or .children?
- Custom CSS without css.php file
- Understanding WordPress(framework?) Web Development
- For best DB performance should I serialize all theme options together or by type?
- Find the Children of a Page then Echo it as a Bulleted List of Links (menu)
- How to control layout of posts on page?
- saving row as a template using WPBakery Page Builder is not working [closed]
- Non-Blog Website without Search: are comments.php and search.php in theme still required?
- Custom metabox for custom page template
- Display recent posts with thumbnail
- Custom Widget options in theme
- Include Parent functions.php in Child Theme functions.php
- Redirect to specified page when insufficient permissions?
- Reasons why all thumbnail sizes aren’t working
- Primary navigation menu & footer not showing in category / tag page
- Jetpack Comments with fall-back
- Update a custom theme with Subversion?
- wp_script_add_data doesn’t seem to work
- How to override checkbox styles if these inputs have a unique id [closed]
- Exclude read more in the_excerpt [closed]
- What are the minimum role/permissions for freelance developer?
- Where am I doing wrong in my theme menu?
- Calculate data and passing to Theme
- Multisite theme path rewrite using .htaccess
- Updating a live theme safely?
- How do I remove inline style in featured image markup?
- different way to achive stylesheet_url
- Change Responsive Images Maximum Width of 1600px
- Why is my CSS not loading?
- How to find default functions of wordpress
- How to remove ver from stylesheet URL? [duplicate]
- How can I hard code my sidebar?
- wp_nav_menu with default pages menu
- How To Detect Posted Comment in Theme Development?
- where is real values of variables?
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- using Options Framework – can “theme-textdomain” domain be changed?
- How to add sidebar to Isola theme? [closed]
- Change the sidebar from left to right twentyfourteen theme
- Custom theme won’t use search.php
- Get attachment meta (I need attachment ID, unsure how to find it)
- Change Image Sizes for Mobile Theme
- Dynamically Populating Image/Excerpt/LInks from Pages in WordPress
- Trouble in creating a custom template on twentyeleven theme
- If I remove Category base from my URLs, how difficult will rollback be?
- Is there a list of default generated Gutenberg block CSS? Unable to align video blocks
- Adding popup support to the theme
- How do I change the color of individual page titles in WordPress?
- Programatically Created Menu not Editable in Dashboard
- How toprint informations in footer
- How to implement pagination in category.php template
- Embedding CodePen Calorie Script – jquery error
- How to reduce the vertical space above and below a ul list uniformly with one command?
- Is it possible to echo a woocommerce prouct attribute discription?
- WordPress Menu item > Sub menu Class update
- Duplicate child theme incl. design changes
- How can I use a different template file for the blog index’s paginated pages?
- How to know and change the machine name of a menu?
- How to customize the colors within a stylesheet using a WordPress setting
- Images use & location, on new wordpress theme
- On wordpress, how do i require specific dimensions from user uploads only
- how to create export / import theme options in wordpress without plugin
- Slider should be display in home template [closed]
- WordPress Customization API overwrite LESS variable
- Create image with imagepng() (fails at header)
- Dynamic meta description
- How to Remove Sidebar when get_sidebar() is not get called in page?
- RSS feed url showing page not found. How to solve it?
- Plugin or script to apply updated media settings to all featured images
- Header links also appearing in the footer
- Extending arrays in parent theme without completely overriding the files
- Retina ready for uploaded images which are cropped
- WordPress Subpages Fancybox Trouble
- Toolbox theme using printif statement – help needed understanding code block
- Search Results not displaying for multiple word search
- Allow users to edit home page from WordPress (home.php problems)
- WordPress does not know the parametrs i sent to admin post
- Display Page featured Image as well as Posts featured Image
- Custom Single Page Portfolio Theme [closed]
- How to send async emails in wordpress?
- ways to create customized theme (hard coded – no pagebuilder)
- Can’t select my block by clicking on it on apiVersion – but using blockProps
- Webpack does not create or update index.asset.php file in build folder