Title: Disable / filter HTML comment
Last modified: October 19, 2020

---

# Disable / filter HTML comment

 *  Resolved [leanderbraunschweig](https://wordpress.org/support/users/leanderbraunschweig/)
 * (@leanderbraunschweig)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/disable-filter-html-comment/)
 * Hi Hector,
 * what a great plugin, thanks so much for this. Especially appreciate the wiki /
   documentation and the `wpp_custom_html`-filter to fully customize the output…!
 * I came across the HTML comment (used for debugging purposes? see line 159 in `
   src/Output.php`)
 * `<!-- WordPress Popular Posts v5.2.4 -->`
 * and was wondering if you could add an option to disable it via filter or option
   on the settings page?
 * Thanks again for your time and efforts, kind regards
 * Henning

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

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/disable-filter-html-comment/#post-13552360)
 * Hi [@leanderbraunschweig](https://wordpress.org/support/users/leanderbraunschweig/),
 * Thanks for the compliments. I’m glad to know you found the documentation (and
   the plugin) useful!
 * That HTML comment is there for debugging purposes, yes. It makes it easier for
   me to locate WPP on the page and to tell exactly which version is installed on
   the user’s site.
 * With that being said, and while it won’t completely remove the HTML comment, 
   setting **WP_DEBUG** to _false_ will remove the version number from the HTML 
   comment.
 * If you don’t mind me asking, why do you want the HTML comment to be removed?
 *  Thread Starter [leanderbraunschweig](https://wordpress.org/support/users/leanderbraunschweig/)
 * (@leanderbraunschweig)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/disable-filter-html-comment/#post-13552393)
 * Hey Héctor,
 * > If you don’t mind me asking, why do you want the HTML comment to be removed?
 * I just try to keep things as clean and lean as possible and plugin comments tend
   to clutter the code – this is very opinionated for sure so this just reflects
   my preferences…
 * A filter would allow to suppress the comment output for advanced users without
   harming the debugging process for >95% of all sites.
 * Your thoughts on this?
 * Thanks & regards,
    Henning
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/disable-filter-html-comment/#post-13552887)
 * Yeah, can’t say I disagree with you on this. I’m also a fan of clean, uncluttered
   code myself (which is why, for example, I avoid using page builder plugins in
   projects whenever I can hahaha.)
 * Alright, I’ll keep your suggestion into consideration: [Implement a filter hook to remove HTML comments (or remove them altogether)](https://github.com/cabrerahector/wordpress-popular-posts/issues/276).
 *  Thread Starter [leanderbraunschweig](https://wordpress.org/support/users/leanderbraunschweig/)
 * (@leanderbraunschweig)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/disable-filter-html-comment/#post-13560610)
 * Thanks Héctor, looking forward!

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

The topic ‘Disable / filter HTML comment’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [leanderbraunschweig](https://wordpress.org/support/users/leanderbraunschweig/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/disable-filter-html-comment/#post-13560610)
 * Status: resolved