Latest recommendations for WordPress code plugins

Many people like to record their used codes in BLOG, but as we all knowThe code function itself is very simple, it even has no beautification effect and is difficult to read. If you want to show beautiful code effects, you must install a suitable. Next, we will select some of the best ones for you.

WordPress code plugin Enlighter

WordPress代码块插件推荐-1 Compared to other plug-ins,EnlighterIt has a more concise style of modern design, the small font is very beautiful, and it supports code block highlighting and inline code highlighting. Whether it is the front-end display or the back-end design, it is a very careful design.

The Enlighter plug-in is very easy to use. You only need to click on the input box, copy the code and save it. You can make beautiful code display without any additional settings. You can directly use it in the default TinyMCE editor of WordPress. Modify the code without opening the code box. Even if you are not familiar with code, you can easily get started.

Enlighter has adapted to the new version of WordPress Gutenberg editor, and provides code modules for it, which can be added directly
WordPress代码块插件推荐-2

WordPress code plugin SyntaxHighlighter Evolved

WordPress代码块插件推荐-3
SyntaxHighlighter EvolvedIt is a very simple plug-in. Its biggest feature is that it is easy to use. It does not add any extra elements to the editor. If you want to highlight the code, you only need to insert the short code of the corresponding language before and after the code, such as To insert PHP language, use the format [php]code[/php]. Of course, the style cannot be adjusted in this way. You can set a default style in the plug-in settings and then apply it to all codes.
WordPress代码块插件推荐-4

WordPress code plugin Code Prettify

WordPress代码块插件推荐-5
It can be said to be the simplest code highlighting plug-in to use.Code PrettifyBased on the formatting of WordPress, a code highlighting style is added. You only need to select the code and then select pre-formatting, and it will automatically sniff the language and add highlighting effects to the code. This plug-in is very suitable for beginners or For non-professional use, it does not have any settings, but it is very convenient to use.

In Gutenberg, Code Prettify also does not add more modules. You only need to set the block similarity to code to use the code highlighting effect of the Code Prettify plug-in.

WordPress code plugin Crayon Syntax Highlighter (not yet supports Gutenberg)

WordPress代码块插件推荐-6
Although it is not adapted to the new version of WordPress editor,Crayon Syntax Highlighter It is still the most comprehensive code highlighting plug-in, built using PHP and Jquery. After installation, it will add a code button in the WordPress editor, and you can customize the code.

At the same time, you can also choose multiple options such as language, fonts, code format, etc., and you can choose your favorite theme, such as Monokai, Eclipse, etc., with dozens of built-in styles
WordPress代码块插件推荐-7
A toolbar is also provided to allow visitors to control the display of codes by themselves, such as

  • Code wrap
  • Extra long width display
  • Code all selected function
  • Line number hidden
  • Open code in new tab

If you don't like the toolbar, you can also set a default value for these options directly in the background, and then hide the toolbar to display pure code.

In addition, remember that Crayon Syntax Highlighter needs to be used with the classic editor. WordPress uses the default classic editor method.

These are all excellent plug-ins, and they are all free plug-ins. They can help us better record code, display code, read code, and improve code format.

score

Leave a Reply

Your email address will not be published. Required fields are marked *