Title: functions in function.php
Last modified: August 22, 2016

---

# functions in function.php

 *  [danni.gutierrez@gmail.com](https://wordpress.org/support/users/dannigutierrezgmailcom/)
 * (@dannigutierrezgmailcom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/functions-in-functionphp/)
 * Hi there.
 * As I am relatively new to this topic I did not realize where I should put the
   call to a function (declared in functions.php) to hide a menu item admin panel.
 * If it’s not too much trouble could you give me an example.
 * Thank you.
 * Daniel.

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

 *  [tormorten](https://wordpress.org/support/users/tormorten/)
 * (@tormorten)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/functions-in-functionphp/#post-5168670)
 * Hi there,
 * To reach the admin panel from your functions.php WordPress offers a series of
   actions and filters. See [http://codex.wordpress.org/Plugin_API/Action_Reference](http://codex.wordpress.org/Plugin_API/Action_Reference)
 * For instance if you would like your code to run when the admin panel initiates
   you could use the action `admin_init`. Example:
 *     ```
       add_action( 'admin_init', 'my_function_name' );
   
       function my_function_name() {
       	// your code here
       }
       ```
   
 * Be aware of using `echo` in some actions as many of them are usually run before
   the HTML-document has been created. To place something in the admin header, there
   is an action called `admin_head` where it is safe to echo stuff.
 * But again, be careful, and read the [Action Reference](http://codex.wordpress.org/Plugin_API/Action_Reference)
   and [Filter Reference](http://codex.wordpress.org/Plugin_API/Filter_Reference)
 * Happy coding!
 *  Thread Starter [danni.gutierrez@gmail.com](https://wordpress.org/support/users/dannigutierrezgmailcom/)
 * (@dannigutierrezgmailcom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/functions-in-functionphp/#post-5168677)
 * Tnkx brother 😉
 * Daniel.

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

The topic ‘functions in function.php’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [danni.gutierrez@gmail.com](https://wordpress.org/support/users/dannigutierrezgmailcom/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/functions-in-functionphp/#post-5168677)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
