@Dan meant this:
<nav role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement"><?php
wp_nav_menu([
'container' => '',
'items_wrap' => '<ul>%3$s</ul>',
...
]);
?></nav>
Related Posts:
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Run a filter when a walker runs
- How do I add custom bulk actions to multiple custom post types?
- Add data attribute to each li in menu
- Unique icons next to each WordPress menu item
- Redirect to another page using contact form 7? [closed]
- Add item to top of menu using a filter in functions.php
- Get the name of menu item with wp_nav_menu
- How to add different menu items on different menus?
- What is the fastest way to load PHP functions that are only used in one theme template?
- My Own layout in WooCommerce pages [closed]
- How to use return in my custom function instead of echo
- Differences when using the the_time and the_date functions
- Have CSS Class Added with `is_page()` WP function
- Can’t load WP function into external function
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Set WordPress Default Template
- Handling Body class based on Template
- Trigger popup in a php if/else statement
- Get_avatar filter?
- Add a class to the anchor tag on HTML5 gallery
- Multiple WordPress Menus that will only display all pages
- Menu — How to add “current-menu-grand-ancestor” css class
- Input type search in Menu
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- add_action shortcut?
- Converting HTML Template to WordPress Theme
- How to remove the cufon script from Dzonia Lite theme [closed]
- How can I remove a function that has been added to wordpress with add_filter?
- How to control WordPress image metadata (using Imagick)?
- Automatically adding new post categories to menu
- what is the best practice to add new field to an api route
- Removing “wpautop” (auto tags) only on certain pages?
- Print last modified date only on posts
- How to add an arrow to menu items has submenus
- WordPress Gravatar filter is removing my custom attributes
- Error in custom php function doesn’t exist
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Child page menu in sidebar
- Populate editor with some content of a page with a page template
- Title Case WordPress Menu Items
- Catchable fatal error: Object of class stdClass could not be converted to string after WP 4.7
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Skt full width basic slideshow problem
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- How to change menu order item
- How to disable controls in theme customizer?
- How do I link a button I created in theme customizer to a function?
- Trying to retrieve post meta
- Is there a way to conditionally check whether a WordPress post title is empty?
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Alter required message using comment form api
- WordPress admin-ajax.php
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- How to make modifications only to certain elements of an HTML string on the server-side?
- Override a function defined in wp-includes/comment-template.php
- Register a menu – Error Header
- Show About and Contact Us page when they’re clicked in the top menu.
- Filtering a function’ output for a new continued function
- How to call multiple functions from multiple files into a WordPress page template [closed]
- Add login hyperlink to secondary navigation menu
- get_template_directory adding FTP root folders in urls
- Deleting Certain terms from appearing on the front end as links
- Theme not calling Jquery properly
- Content filter won’t work
- What is the best way to define constant options for a theme?
- Warning: in_array() null given in PHP function
- Upload multiple files in randomly generated folder using wp_upload_bits
- Create page template via functions.php?
- Add meta tags to a custom header
- Add value to new attribute inside WordPress menu items
- How to make function appear in sentence?
- How to have different site identity logos on each page on Astra Theme [closed]
- wp_nav_menu not working correctly in my underscores theme
- Custom query vars filters problem with pagination
- How to modify mobile nav menu text in theme
- Removing “Powered by” footer using child theme PHP [closed]
- Output only links using wp_nav_menu()
- Get css class of menu item in custom menu structure
- get_page_templates only return templates with “home” in the filename
- How can I use custom menus with a Bootstrap WordPress theme?
- Is there a hack for using is_page() within the function.php file?
- Extract and display user infromation on an automatically created page
- Must filter functions receive all arguments passed to them?
- Nav-Menu not showing up
- Show different website layout if no sidebar added
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Why in this WordPress theme I can’t see the Main Menu?
- How can I assign separate stylesheets to different pages?
- Need advice on theme customizer and child themes
- How to make sure relative URL works when site is not on root domain?
- Remove submenu item from list
- How to tell if a user has gone in and created a menu
- Dynamic Menu drops pages?