Title: Problems adding administration menus
Last modified: August 19, 2016

---

# Problems adding administration menus

 *  [Rafael Dourado](https://wordpress.org/support/users/rdourado/)
 * (@rdourado)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/problems-adding-administration-menus/)
 * What happened to the functions that adds administrative menus? I always used `
   add_management_page` on `functions.php`, but now it is not working any more since
   I upgraded to WP2.6.2. And even if I copy everything to a new plugin file it 
   keeps saying that I can not redeclare the function used on `add_management_page`.
   Yes, I deleted the same function from `functions.php`, but it did not fixed it.
   And the function I am using is not beeing declared twice. The code:
 *     ```
       function test_function() {
       echo 'OK';
       }
       function test_head() {
       add_management_page('Test', 'Test', 7, __FILE__, 'test_function');
       }
       add_action('admin_head', 'test_head');
       ```
   
 * `Fatal error: Cannot redeclare test_function() (previously declared in /canoaviagem.
   com.br/www/wp-content/plugins/canoaviagem.php:13) in /canoaviagem.com.br/www/
   wp-content/plugins/canoaviagem.php on line 14`

Viewing 1 replies (of 1 total)

 *  Thread Starter [Rafael Dourado](https://wordpress.org/support/users/rdourado/)
 * (@rdourado)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/problems-adding-administration-menus/#post-860773)
 * Well, I changed action from ‘admin_head’ to ‘admin_menu’ and it worked. But if
   I want to add more than one menu item, it looks like that I will have to create
   more than one file for each menu, because the function parameters is not making
   any difference. If I do something like this:
 *     ```
       add_management_page('Test', 'Test', 7, __FILE__, 'test_function');
       add_management_page('Test 2', 'Test 2', 7, __FILE__, 'sec_test_function');
       ```
   
 * Both functions are beeing called at the same time.

Viewing 1 replies (of 1 total)

The topic ‘Problems adding administration menus’ is closed to new replies.

## Tags

 * [menu](https://wordpress.org/support/topic-tag/menu/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Rafael Dourado](https://wordpress.org/support/users/rdourado/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/problems-adding-administration-menus/#post-860773)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
