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?
- Hide main div if wp_nav_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
- 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?
- Get widget settings function?
- Logout and redirect using the WP Menu
- Wrap each shortcode in array to div
- javaScript in section of WP API
- Nested shortCode functions in the functions.php file
- 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
- is_page “range” for if statement?
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Run a filter when a walker runs
- Shortcode content filter?
- Showing content from one page on another
- Get value from shortcode to do something
- Add data attribute to each li in menu
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- Custom shortcode outputs plain text instead of HTML at top of post
- Unique icons next to each WordPress menu item
- 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
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- Redirect to another page using contact form 7? [closed]
- Shortcode with PHP issue “Undefined index”
- 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?
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Creating WordPress Shortcode with Variable
- Add login hyperlink to secondary navigation menu
- calling a custom field value inside functions.php
- List all blogs, but exclude the main site
- My website is not showing Footer section
- Shortcode for Listing Users from Meta Value?
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- 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
- Add a select-option to the default widgets
- Dynamic Menu drops pages?
- how to changes mobile menu toggle breakpoint in WordPress
- How to display already created menus via php?
- Updating Metadata with Shortcode
- Display logged in user name and lastname on page
- How a HTML form can trigger a PHP function?
- Create shortcode for metabox gallery
- Display Visual Composer shortcode if a post belongs in specific categories
- How can I prevent a shortcode div from extending beyond its boundaries?
- 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
- 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
- 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
- Wrapping shortcode content in a span or link
- Widget Logic – display on page and all child
- Add disclaimer before certain posts and pages
- 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’?
- How to list categories by page id in wordpress
- How I can add div to menu?
- List sibling pages widget, exclude current page
- Overwriting a Shortcode
- Shortcoding with Divs
- 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?
- Display terms on product page with shotrcode
- Custom Navigation Bar JSON Syntax Error in JSON at Position 0
- How call WordPress shortcode inside function file
- How to edit a widget code?
- Calling a function via a shortcode in javascript
- Woocomerce custom add to cart button edit functionality [closed]