Title: Code in comments issue
Last modified: August 22, 2016

---

# Code in comments issue

 *  Resolved [zeaks](https://wordpress.org/support/users/zeaks/)
 * (@zeaks)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-comments-issue/)
 * My site gets a lot of code poste din comments and yesterday when someone posted
   a block of code it did not display properly.
 * I tried to post the same code myself in comments and it didn’t display properly
   either. I took the same code and posted it into a regular post and it displayed
   fine.
 * This is the code here
 *     ```
       <?php if ( is_single() ) : ?>
       <h1 class="entry-title"><?php the_title(); ?></h1>
       <?php else : ?>
       <h1 class="entry-title">
       <a href="<?php the_permalink(); ? rel="nofollow">" rel="bookmark"><?php the_title(); ?></a>
       </h1>
       ```
   
 * This is what it ends up looking like [http://postimg.org/image/esafhwm1h/](http://postimg.org/image/esafhwm1h/)
 * Any idea why this particular bit of code isn’t displaying properly in just the
   comments? Other code posted into comments displays perfectly. Crayon Syntax Highlighter
   and other plugins I’ve tried display it fine but I’d like to keep using this 
   one.
 * [https://wordpress.org/plugins/mivhak/](https://wordpress.org/plugins/mivhak/)

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

 *  Plugin Author [Askupa Software](https://wordpress.org/support/users/askupa-software/)
 * (@askupa-software)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-comments-issue/#post-5627196)
 * I was able to reproduce this issue. I’ll get back to you when I find out the 
   cause of it.
    Thanks for letting me know.
 *  Plugin Author [Askupa Software](https://wordpress.org/support/users/askupa-software/)
 * (@askupa-software)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-comments-issue/#post-5627198)
 * I figured it out. Turns out I wasn’t applying the backend filters to the comments
   as well.
    It will be fixed on the next update. Meanwhile, use add this code to`
   Mivhak.php` right after line 25:
 * `add_filter( 'comment_text', array( __CLASS__, 'format' ), 0 );`
 *  Thread Starter [zeaks](https://wordpress.org/support/users/zeaks/)
 * (@zeaks)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-comments-issue/#post-5627201)
 * Great, thanks for the quick response and fix!

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

The topic ‘Code in comments issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mivhak_86b0b1.svg)
 * [Mivhak Syntax Highlighter](https://wordpress.org/plugins/mivhak/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mivhak/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mivhak/)
 * [Active Topics](https://wordpress.org/support/plugin/mivhak/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mivhak/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mivhak/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [zeaks](https://wordpress.org/support/users/zeaks/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-comments-issue/#post-5627201)
 * Status: resolved