Title: Search results include php code
Last modified: August 19, 2016

---

# Search results include php code

 *  [caplain](https://wordpress.org/support/users/caplain/)
 * (@caplain)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/search-results-include-php-code/)
 * I have many custom pages that display content using included php templates, rather
   than content typed into the WP Page editor.
 * I just discovered that when I use the built-in search, it returns results that
   include javascript in my custom templates. This doesn’t only provide a bad user
   experience, but could pose a security threat by exposing sensitive code.
 * Is there a way to stop search from indexing <script…></script within templates?

Viewing 1 replies (of 1 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/search-results-include-php-code/#post-1705756)
 * may be it’s caused by a plugin
    deactivate them all and reactivate one by one–
   testing in between

Viewing 1 replies (of 1 total)

The topic ‘Search results include php code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/search-results-include-php-code/#post-1705756)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
