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:
- Mega Menu Walker
- start_lvl Ignored in Custom walker_nav_menu
- Displaying Logged-In User Name in WordPress Menu
- Check if a menu is empty?
- Shortcode putting html such as
- 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
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Add/echo div with Analytics-Code to function in functions.php
- display most popular tags in two columns
- 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
- Recent post display using shortcode
- Nested shortCode functions in the functions.php file
- Add before_content and after_content to register_sidebar
- Making Quote Plugin more efficient
- Placing raw HTML inside a WordPress shortcode
- Shortcode content output but not in correct place
- PHP code inside shortcodes
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Trigger popup in a php if/else statement
- Menu — How to add “current-menu-grand-ancestor” css class
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- How to put a variable in a instance in the widget
- How to output a PHP file values by shortcode?
- How to display posts by current user in a drop down
- Automatically adding new post categories to menu
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- Pass php dynamic variable to shortcode
- Child page menu in sidebar
- Title Case WordPress Menu Items
- Adding a widget function into the php theme file
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- How to Reference/Echo Variable from Another PHP Function
- Remove echo from shortcode
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- How to change menu order item
- Redirect to another page using contact form 7? [closed]
- Add item to top of menu using a filter in functions.php
- Shortcode from a function not working
- Display Data in Table from External Database in WP using Shortcodes
- Is it possible to return content, and then also continue to do other things?
- Register a menu – Error Header
- Widget back end radio button issue
- Creating WordPress Shortcode with Variable
- Shortcode to find and replace URL
- Help with WordPress function inside a shortcode
- 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?
- Need to Modify a WordPress Shortcode with another wordpress 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?
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Remove submenu item from list
- Dynamic Menu drops pages?
- AJAX function not working [closed]
- How to display already created menus via php?
- Display logged in user name and lastname on page
- How a HTML form can trigger a PHP function?
- Display Visual Composer shortcode if a post belongs in specific categories
- Why is the current page loaded in the pop-up window and not the specified one?
- How do I reopen the (Popup Maker) after entering the correct password for a password protected page?
- Block error message in foreach loop when looping through ACF field
- How can I prevent a shortcode div from extending beyond its boundaries?
- PHP multiple forms, same page, isset($_POST[]) not working?
- Gravity Forms: How to add PHP function to confirmation conditional shortcode?
- wpdb->query returns different value to phpMyAdmin
- shortcodes, custom php and their errors
- Display a custom name when the user has no name settle in his account
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- How to put 2 php codes in functions.php without site crashing
- 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?
- Offset with ajax load more posts duplicates
- Get posts by id using shortcode
- Shortcode’s output to use as other shortcode’s parameter
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- 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
- Contact form field in wordpress menu
- WordPress – registering sidebar and adding a button directly after .textwidget
- List sibling pages widget, exclude current page
- Shortcoding with Divs
- WordPress adding in site URL to header links
- WP Debug enabled Undefined index error in a widget
- My title is showing after the shortcode
- Shortcode to include PHP file, pass various parameters to include?
- Display terms on product page with shotrcode
- How to add different menu items on different menus?
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- How to edit a widget code?