

Example of the plugin shown on the frontend.
WpBetterCodeHighlighting is built on the popular JS Library PrismJS. Unlike other code snippet plugins this one is completely free and uses a shortcode rather than a Gutenberg block this means it works with themes too. Allowing you to showcase code snippets on your wordpress tutorial site or blog site.
Example usage (shortcode):
[wpbch language='html']<p>Your code goes here.</p>
<p>This would be another line of code etc etc.</p>
[/wpbch]
language – default null, will display an error if a language acronym is not provided, see supported languages section below for a list of supported languages.
line_numbers – default true provide false if you wish to disable line numbers.
copy_button – default true provide false if you wish to disable the copy button.
copy_button_text – default Copy provide a different value if you wish to change the copy button default text.
copy_button_success – default Copied! Provide a different value if you wish to change the success copy button message.
copy_button_error – default Error provide a different value if you wish to change the error copy button message.
[wpbch language='html' line_numbers=true copy_button=true copy_button_text='Copy Me' copy_button_success='Yay you copied me' copy_button_error='Oops you failed to copy me']<p>Your code goes here.</p>[/wpbch]
Replace html with one of the supported languages acronyms below. For example apacheconf for Apache Config.
Language Name | Acronym to be used in language argument