Title: Hide Javascript code in excerpt
Last modified: August 30, 2016

---

# Hide Javascript code in excerpt

 *  Resolved [pandaura](https://wordpress.org/support/users/pandaura/)
 * (@pandaura)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/hide-javascript-code-in-excerpt/)
 * Is there any way to hide the Javascript code in the excerpt without manually 
   adding a post excerpt?

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

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [10 years, 6 months ago](https://wordpress.org/support/topic/hide-javascript-code-in-excerpt/#post-6745093)
 * It depends on how that javascript is being added to the content. If you are using
   a plugin then for excerpts the plugin removed from the_excerpt via a filter.
 * Is that from a plugin and if so which one?
 *  Thread Starter [pandaura](https://wordpress.org/support/users/pandaura/)
 * (@pandaura)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/hide-javascript-code-in-excerpt/#post-6745234)
 * Hi Jan!
 * Thank you for the reply and pointing out how the script is added. It is certainly
   not from a plugin. The script is at the top of the post and the excerpt field
   is empty. I rechecked the script and added the code below; it solved my problem.
 *     ```
       <script>
       //<![CDATA[
           ...code...
       //]]>
       </script>
       ```
   

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

The topic ‘Hide Javascript code in excerpt’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [pandaura](https://wordpress.org/support/users/pandaura/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/hide-javascript-code-in-excerpt/#post-6745234)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
