![]() Going through the Block Editor, you just need to paste in the code that you want displayed and fiddle with some of the settings in the right sidebar, using metaboxes and details. Syntax Code HighlighterĬode Syntax Block uses the Prism syntax highlighter to render code snippets in your WordPress posts and pages. This alone makes Enlighter worth checking out because of how readable it makes every line of code you put on your website. (Or editing through an actual Block Editor block.) This feature helps a lot with readability for your posts and explanation so fthe code, as well as lets you more easily include only part of a complete snippet in context of a particular line, function, or phrase.Īdditionally, this is one of the few plugins that has a “generic language” highlighter, meaning that if you put in a snippet and the plugin can’t tell if that is from PHP, HTML, JavaScript, or something else, it will still highlight it as well as possible, meaning that it won’t appear simply as plain-text. Most of the code snippet plugins only allow for block formatting. A big plus to this one is how you can add code in-line rather than in its own block. ![]() Powered by EnlighterJS, the similarly named Enlighter plugin gives you a lot of control over how your code snippets display on your site. Enlighter – Customizable Syntax Highlighter ![]() That also lets you use the same snippets in more than one location and upkeep only a single instance of it. We appreciate that this plugin gives you a full list of all code snippets on your website (those that are created with this plugin, that is), so that any updates or edits that need to be made are quick and easy without having to search and find which post or page contains it. One of the standout features of this plugin is that not only are the displayed lines of code formatted to read and copy easily, it comes with a custom field for a code description so that you can easily track what snippets do what (and so your readers can get a full description, too). Lucky for all of us, Code Snippets actually does display code snippets well. When you see a plugin simply called Code Snippets, there’s a good chance you know what it does. It’s easy, quick, and simple like most other custom Gutenberg blocks. If shortcodes aren’t your thing, then you can make sure to use the custom block for the Block Editor. The plugin also runs with various shortcode parameters, meaning that you just need to insert a shortcode into a post or a page, then adjust various elements on a per-snippet basis. The last thing someone who is looking for code needs is to have to reformat it and debug it on their own. Also, when the code block is clicked, it displays a plain-text version of the code that makes copying and pasting easier on the user’s end. They can also click into the displayed code snippet and copy it for their own use. You can adjust various settings such as color and formatting in the settings of the plugin. ![]() It will display that code fully highlighted and formatted for your readers. ![]() We have a full guide on how to get it installed and set up on your site. Basically, you can paste the code into the empty field, and the plugin takes it from there. One of the standards in this arena, SyntaxHighlighter Evolved is simple to use and install. Our Top 4 Code Snippet Plugins for WordPress 1. 2 Wrapping Up with Code Snippet Plugins.1 Our Top 4 Code Snippet Plugins for WordPress. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |