Title: Theme developer doc re functions.php
Last modified: January 23, 2023

---

# Theme developer doc re functions.php

 *  [jsmith909](https://wordpress.org/support/users/jsmith909/)
 * (@jsmith909)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/theme-developer-doc-re-functions-php/)
 * On the page I need help with … It’s a page from Developer documentation for Themes…
   and it says on that page:
 * “If a WordPress plugin calls the same function, or filter, as you do in your `
   functions.php`, the results can be unexpected, even causing your site to be disabled.”
 * Can you explain why this gives unexpected results?
 * I don’t understand why. eg … It seems that statement is saying that if I call
   add_action.php() in functions.php, as well as in my pugin, that the results are
   unexpected. But that doesn’t sound right to me.
 * Thank you,
 * Josh
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftheme-developer-doc-re-functions-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [tugbucket](https://wordpress.org/support/users/tugbucket/)
 * (@tugbucket)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/theme-developer-doc-re-functions-php/#post-16400527)
 * add_action() is a core function. So that wouldn’t cause an issue. What it’s saying
   if that say a plugin has a custom function called like do_this() and you write
   a function for your functions file and also call it do_this() that will cause
   an issue. You should notice that most plugins, or at least they should, would
   write like plugin_name_do_this() to make the function name unique to help possibly
   prevent the issue. So if you were wanting to write a custom function you could
   use like do_this_jsmith909() to make yours unique.
 *  Thread Starter [jsmith909](https://wordpress.org/support/users/jsmith909/)
 * (@jsmith909)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/theme-developer-doc-re-functions-php/#post-16402188)
 * [@tugbucket](https://wordpress.org/support/users/tugbucket/) – Thanks for your
   reply. That’s what I thought it meant to say. I know of that issue, but that 
   could be confusing for someone that doesn’t know. I’ll look for a way to submit
   to change that. What do you think of this wording…
 * “If a function or filter in a WordPress plugin has the same name as one in `functions.
   php`, the results can be unexpected, even causing your site to be disabled. A
   good practice is for functions in a plugin, prefix them with the plugin name,
   eg ‘plugin_name_do_this()’.”

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

The topic ‘Theme developer doc re functions.php’ is closed to new replies.

## Tags

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

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 2 replies
 * 2 participants
 * Last reply from: [jsmith909](https://wordpress.org/support/users/jsmith909/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/theme-developer-doc-re-functions-php/#post-16402188)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
