Title: Plugin adding extra code to posts
Last modified: July 18, 2018

---

# Plugin adding extra code to posts

 *  Resolved [hijak](https://wordpress.org/support/users/hijak/)
 * (@hijak)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/plugin-adding-extra-code-to-posts/)
 * So I recently changed my template/Theme for my wordpress site, and the discord
   bot continues to work well (thank you for fixing it) but now it seems to add 
   extra code to the posts on my discord server. Example is below
 * [http://prntscr.com/k82ir5](http://prntscr.com/k82ir5)
    -  This topic was modified 7 years, 10 months ago by [hijak](https://wordpress.org/support/users/hijak/).

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

 *  Plugin Author [Nicola Mustone](https://wordpress.org/support/users/nicolamustone/)
 * (@nicolamustone)
 * Automattic Happiness Engineer
 * [7 years, 10 months ago](https://wordpress.org/support/topic/plugin-adding-extra-code-to-posts/#post-10507879)
 * Good finding! I forgot to strip the tags from the excerpt.
    As a temporary fix
   you can use the following code in functions.php
 *     ```
       add_filter( 'wp_discord_post_post_embed', 'workaround_strip_tags_excerpt' );
       function workaround_strip_tags_excerpt( $embed ) {
           if ( isset( $embed['description'] ) ) {
               $embed['description'] = strip_tags( $embed['description'] );
           }
   
           return $embed;
       }
       ```
   
 *  Thread Starter [hijak](https://wordpress.org/support/users/hijak/)
 * (@hijak)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/plugin-adding-extra-code-to-posts/#post-10509110)
 * Thanks, that worked.
 *  Plugin Author [Nicola Mustone](https://wordpress.org/support/users/nicolamustone/)
 * (@nicolamustone)
 * Automattic Happiness Engineer
 * [7 years, 10 months ago](https://wordpress.org/support/topic/plugin-adding-extra-code-to-posts/#post-10510796)
 * I’ll mark this as solved, since I already applied a fix to be released with the
   next version and the workaround above works until then.

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

The topic ‘Plugin adding extra code to posts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-discord-post.svg)
 * [WP Discord Post](https://wordpress.org/plugins/wp-discord-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-discord-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-discord-post/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-discord-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-discord-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-discord-post/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Nicola Mustone](https://wordpress.org/support/users/nicolamustone/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/plugin-adding-extra-code-to-posts/#post-10510796)
 * Status: resolved