Key Features
- Add a “Insert Code” button directly inside the comment area.
- A code input modal with programming language selection.
- Generates shortcode format:
[code lang="..."]...[/code]. - Automatically loads PrismJS if it’s not already included in your theme.
- Supports both English and Vietnamese interfaces.
- Supports dark mode: Can be enabled via the
darkclass or configured using thewindow.initPluginSuiteCodeInserterConfig.themevariable with values'light','dark', or'auto'before the plugin initializes.
How it works
Once the plugin is activated, you’ll see an “Insert Code” button in the comment area. When users click it, a modal will appear allowing them to input the code they want to share, choose a programming language, and insert it into their comment.
For example, a user enters the following JavaScript code:
[code lang="javascript"]console.log("Hello world!");[/code]
The plugin will automatically render the code with syntax highlighting using PrismJS:
console.log("Hello world!");
You can try this feature right away by leaving a comment below! Click the Insert Code button to add code to your comment.
Installation Guide
- Download the plugin from the official page (this one).
- Unzip it and upload to the
/wp-content/plugins/directory. - Go to your WordPress admin > Plugins > Activate Init Code Inserter.
- Visit a post with comments to try the Insert Code button.
Why use this plugin?
For tech blogs or community sites, inserting code in comments can often break formatting or look messy. Init Code Inserter helps:
- Ensure clean and beautiful formatting for code snippets.
- Avoid HTML errors when users paste raw code directly into the comment box.
- Make the comment section easier to read, easier to discuss, and more professional.
Code insertion modal in the comment section
With Init Code Inserter, users can easily insert code snippets directly into comments with just one click.

Code insertion modal interface in the comment box.
Support
For feedback, bug reports, or feature requests, please leave a comment on this post.
Init Code Inserter is a lightweight yet extremely useful tool that helps keep your blog comments clean, properly formatted, and provides a better experience for code-loving users.