Title: Plugin adds code to post excerp
Last modified: August 30, 2016

---

# Plugin adds code to post excerp

 *  Resolved [xdundee](https://wordpress.org/support/users/xdundee/)
 * (@xdundee)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/)
 * Hi, great plugin but it adds piece of code after the “More” function that allows
   you to set post excerpt. As you can see it here: [http://harapad.com/category/blog/](http://harapad.com/category/blog/).
   It doesn’t do it on grid view but I would like to also fix it on this blog view.
   Is that possible?
    Thanks
 * [https://wordpress.org/plugins/infographic-embedder/](https://wordpress.org/plugins/infographic-embedder/)

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

 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577282)
 * Divi does a lot of crazy stuff, but I’ll see if I can make this attach a bit 
   more cleanly in a new version. Hopefully that’ll help.
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577283)
 * You might be able to fix this by conditionally filtering things using the [hooks I’ve provided](https://wordpress.org/plugins/infographic-embedder/installation/).
   This is untested:
 *     ```
       add_action( 'the_content', 'yournamespace_exclude_infographic' );
   
       function yournamespace_exclude_infographic() {
   
           // See if category archive is being diplayed
           if ( is_category() ) {
   
               add_filter( 'infographic_embedder_image_code', 'yournamespace_return_empty_string' );
               add_filter( 'infographic_embedder_download_html', 'yournamespace_return_empty_string' );
               add_filter( 'infographic_embedder_embed_html', 'yournamespace_return_empty_string' );
   
           }
   
       }
   
       function yournamespace_return_empty_string() {
   
           return '';
   
       }
       ```
   
 *  Thread Starter [xdundee](https://wordpress.org/support/users/xdundee/)
 * (@xdundee)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577300)
 * Hi, this hid all the pages so just header and footer remained.
    Any other ideas?
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577301)
 * Derp. Gave you the wrong action to hook into. Let’s try this instead.
 *     ```
       add_action( 'the_post', 'yournamespace_exclude_infographic' );
   
       function yournamespace_exclude_infographic() {
   
           // See if category archive is being diplayed
           if ( is_category() ) {
   
               add_filter( 'infographic_embedder_image_code', 'yournamespace_return_empty_string' );
               add_filter( 'infographic_embedder_download_html', 'yournamespace_return_empty_string' );
               add_filter( 'infographic_embedder_embed_html', 'yournamespace_return_empty_string' );
   
           }
   
       }
   
       function yournamespace_return_empty_string() {
   
           return '';
   
       }
       ```
   
 *  Thread Starter [xdundee](https://wordpress.org/support/users/xdundee/)
 * (@xdundee)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577305)
 * 99% there.
    Now there is just “%px” inserted to the end of the excerpt. I found
   out you can also fix it by simply setting your own custom excerpt in post editing.
 *  Plugin Author [Cliff Seal](https://wordpress.org/support/users/cliffseal/)
 * (@cliffseal)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577309)
 * Well dang, that’s the one unfilterable part of the content output. Maybe this’ll
   fix you up enough:
 *     ```
       add_filter( 'get_the_excerpt', 'yournamespace_exclude_infographic_percentage' );
       add_filter( 'the_content', 'yournamespace_exclude_infographic_percentage' );
   
       function yournamespace_exclude_infographic_percentage($output) {
   
           // See if category archive is being diplayed
           if ( is_category() ) {
   
               $output = str_replace( '%px', '', $output );
   
           }
   
           return $output;
   
       }
       ```
   
 * Yeah, custom excerpts will definitely fix it in any case, but I’d prefer for 
   you to not have to do that. 🙂
 *  Thread Starter [xdundee](https://wordpress.org/support/users/xdundee/)
 * (@xdundee)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577311)
 * Thanks. Unfortunately take that cool functionality to Download infographic also
   from the grid view where it works. But I understand it might be hard, there must
   be some reason why Divi blog grid works but Divi blog fullwidth doesn’t.
    Anyway
   take it as problem solved. Thanks

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

The topic ‘Plugin adds code to post excerp’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/infographic-embedder_6c7574.svg)
 * [Infographic Embedder](https://wordpress.org/plugins/infographic-embedder/)
 * [Support Threads](https://wordpress.org/support/plugin/infographic-embedder/)
 * [Active Topics](https://wordpress.org/support/plugin/infographic-embedder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/infographic-embedder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/infographic-embedder/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [xdundee](https://wordpress.org/support/users/xdundee/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-adds-code-to-post-excerp/#post-6577311)
 * Status: resolved