Title: Custom menus and fallback function arguments&#8230;
Last modified: August 20, 2016

---

# Custom menus and fallback function arguments…

 *  Resolved [Tsevdos](https://wordpress.org/support/users/tsevdos/)
 * (@tsevdos)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/custom-menus-and-fallback-function-arguments/)
 * Hello there,
 * I’ve added a custom menu to my latest theme, and as you can see below I’m passing
   a callback function (to view the categories in case the user has older WP version
   or he didn’t add any custom menus yet).
 * My question is, How can I add arguments to this callback function?!?! I need 
   to remove the title, order them etc.
 *     ```
       wp_nav_menu( array(
       	'theme_location'  => 'main',
       	'container'       => 'nav',
       	'container_class' => 'main',
       	'fallback_cb'     => 'wp_list_categories',
       	)
       );
       ```
   
 * thanks in advance,
    John

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Tsevdos](https://wordpress.org/support/users/tsevdos/)
 * (@tsevdos)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/custom-menus-and-fallback-function-arguments/#post-2156311)
 * Any ideas?!?!
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/custom-menus-and-fallback-function-arguments/#post-2156330)
 * You need to define an _actual callback_, rather than calling a _core WordPress
   function_.
 * e.g. in `functions.php`:
 *     ```
       function mytheme_wp_nav_menu_cb() {
            // callback code goes here
            // you can even output wp_list_categories() if you want
       };
       ```
   
 * Then, in your `wp_nav_menu()` call:
 *     ```
       wp_nav_menu( array(
       	'theme_location'  => 'main',
       	'container'       => 'nav',
       	'container_class' => 'main',
       	'fallback_cb'     => 'mytheme_wp_nav_menu_cb',
       	)
       );
       ```
   
 *  Thread Starter [Tsevdos](https://wordpress.org/support/users/tsevdos/)
 * (@tsevdos)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/custom-menus-and-fallback-function-arguments/#post-2156384)
 * Awesome it worked great Chip! Thanks you so much.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom menus and fallback function arguments…’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [Tsevdos](https://wordpress.org/support/users/tsevdos/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/custom-menus-and-fallback-function-arguments/#post-2156384)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
