I don’t think there’s wp_nav_menu
action. Perhaps you want the wp_nav_menu
filter (doc)?
function custom_novice_menu($args) {
if( 'primary' == $args['theme_location'] ) // only apply to the right menu
{
$args['container'] = 'div';
}
return $args;
}
add_filter('wp_nav_menu', 'custom_novice_menu');
Related Posts:
- How to manually fix the WordPress gallery code using PHP in functions.php?
- Mega Menu Walker
- start_lvl Ignored in Custom walker_nav_menu
- Displaying Logged-In User Name in WordPress Menu
- Hide main div if wp_nav_menu is empty
- Check if a menu is empty?
- Shortcode putting html such as
- How to remove a metabox from menu editor page?
- How to get the registered sidebar’s name by its id?
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Shortcode created to check language not works
- 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”
- How to add active class to custom menu using while loop and wp_list_pages
- Add/echo div with Analytics-Code to function in functions.php
- display most popular tags in two columns
- How to add Shortcode (font awesome) in widget title?
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- How can I default to all WordPress roles when parameter is not included in shortcode?
- PHP contact form returns warning in text widget [closed]
- Get widget settings function?
- Logout and redirect using the WP Menu
- Wrap each shortcode in array to div
- Recent post display using shortcode
- javaScript in section of WP API
- Nested shortCode functions in the functions.php file
- Add before_content and after_content to register_sidebar
- Making Quote Plugin more efficient
- PHP Deprecated: WP_RSSjb has a deprecated constructor
- Placing raw HTML inside a WordPress shortcode
- Have CSS Class Added with `is_page()` WP function
- List all blogs, but exclude the main site
- Shortcode to embed Edit Account form not working
- Add value to new attribute inside WordPress menu items
- My website is not showing Footer section
- Shortcode for Listing Users from Meta Value?
- Cant display an image via PHP in wordpress
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- Get the name of menu item with wp_nav_menu
- How to add aria role and schema markup to custom walker container
- How can I use custom menus with a Bootstrap WordPress theme?
- How to get post category list as select in front-end?
- Nav-Menu not showing up
- Show different website layout if no sidebar added
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Remove submenu item from list
- Add a select-option to the default widgets
- Dynamic Menu drops pages?
- AJAX function not working [closed]
- Menu not styling. New menus functionality giving me a headache
- how to changes mobile menu toggle breakpoint in WordPress
- Display current user metadata on WordPress page
- Reload page with a different shortcode when a user selects from a dropdown
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Add element after navigation element title don’t works like I expect
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Offset with ajax load more posts duplicates
- Add parent menu item in sub-menu in custom nav_walker
- Get posts by id using shortcode
- Shortcode’s output to use as other shortcode’s parameter
- is_user_logged_in() not working in homepage
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- Open/closed function [closed]
- Need to Echo A Url path to show on a wordpress page
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- Wrapping shortcode content in a span or link
- Widget Logic – display on page and all child
- Add disclaimer before certain posts and pages
- Pulling a variable into the wp_nav_menu function
- Need help with PHP functions
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- Beyond widget side menu editing, with the php page, custom template
- How to list categories by page id in wordpress
- How I can add div to menu?
- Contact form field in wordpress menu
- WordPress – registering sidebar and adding a button directly after .textwidget
- How to have Function of a plugin using global vars into a shortcode?
- List sibling pages widget, exclude current page
- Overwriting a Shortcode
- Shortcoding with Divs
- WordPress adding in site URL to header links
- PHP Widget and do_shortcode
- WP Debug enabled Undefined index error in a widget
- Whats wrong with my code? Need To add String to shortcode? [closed]
- My title is showing after the shortcode
- A next page function with shortcode?
- Shortcode to include PHP file, pass various parameters to include?
- WP Custom tables query
- Display terms on product page with shotrcode
- Custom Navigation Bar JSON Syntax Error in JSON at Position 0
- How to add different menu items on different menus?
- How call WordPress shortcode inside function file
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- How to edit a widget code?
- Calling a function via a shortcode in javascript
- Adding a css class to the gallery
- Strip and print only the numbers found in current’s post excerpt (even if they are without space)
- Woocomerce custom add to cart button edit functionality [closed]
- Trying to insert widget code into theme function