Title: Question on functions.php and Admin Dashboard.
Last modified: August 20, 2016

---

# Question on functions.php and Admin Dashboard.

 *  [fatalx](https://wordpress.org/support/users/fatalx/)
 * (@fatalx)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/question-on-functionsphp-and-admin-dashboard/)
 * So I have a ton of code in my functions.php and a very large majority of it is
   for admin logged into wp-admin. Is there a way to make it so parts of my code
   will only run for admins logged into wp-admin?
 * Although a normal user won’t see anything happening in the functions.php file.
   There is no need to a lot of that code to run for them at all.
 * Thanks in advance.

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

 *  [govpatel](https://wordpress.org/support/users/govpatel/)
 * (@govpatel)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/question-on-functionsphp-and-admin-dashboard/#post-2362435)
 * Warning! If you make any change to theme functions.php file it will break your
   website do not do any change unless you know what you doing.
 *  [MickeyRoush](https://wordpress.org/support/users/mickeyroush/)
 * (@mickeyroush)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/question-on-functionsphp-and-admin-dashboard/#post-2362439)
 * > Is there a way to make it so parts of my code will only run for admins logged
   > into wp-admin?
 * It would be better to try a plugin. I’ve used one of these before in the past.
 * [http://wordpress.org/extend/plugins/st-admin-protection/](http://wordpress.org/extend/plugins/st-admin-protection/)
   
   [http://wordpress.org/extend/plugins/wp-block-admin/](http://wordpress.org/extend/plugins/wp-block-admin/)
   [http://wordpress.org/extend/plugins/remove-dashboard-access-for-non-admins/](http://wordpress.org/extend/plugins/remove-dashboard-access-for-non-admins/)
   [http://wordpress.org/extend/plugins/wp-hide-dashboard/](http://wordpress.org/extend/plugins/wp-hide-dashboard/)
 * But be warned, these could cause problems with plugins and other functionalities
   of WordPress.

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

The topic ‘Question on functions.php and Admin Dashboard.’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [MickeyRoush](https://wordpress.org/support/users/mickeyroush/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/question-on-functionsphp-and-admin-dashboard/#post-2362439)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
