Snippet is a small piece of PHP code you can use to extend the functionality of a WordPress-powered website; A mini-plugin for low load on your site. Code Snippets is a clean and easy way to run PHP code snippets on your site. This eliminates the need to add custom snippets to your theme’s functions.php file.
Preserve Code Formatting
This plugin conserves the configuration of the code for display by preventing editing by WordPress and other plugins. This plugin makes no claims about work when you create Visual Editor enabled posts. The use of a visual text editor can cause problems, as it can change your intent in terms of letters.
- Optionally save the code added in the comments
- Prevent the processing of shortcodes
- Optionally preserve whitespace
- Prevent most other plugins from editing the protected code
Snipplr plugin is essentially a code-sharing site on the surface. You will need to register an account to receive the API key, but this will be done very quickly. Using the Snippet ID allows you to embed snippets directly into your blog posts. You can also post a piece of code on their website and then embed it on your page or post, as well as you can embed a Tweet or Instagram post.
- Easily embed snippets into the page using snippet id=##
- Highlight code using GeSHi.
- Customizable layout using CSS
- Sidebar widget to show your latest code snippets.
Custom CSS Pro
Custom CSS Pro is the best WordPress plugin for code snippets. Custom CSS Pro WordPress plugin lets you add custom CSS code to your WordPress website in a convenient way. The WordPress plugin provides some handy features, including real-time live preview and line numbering, to make code editing a little easier.
- It has a real-time live preview.
- There is a simple UI for it.
- It consists of a professional CSS Editor.
Sniplets is a simple text embedding plugin that supports the extensible processing framework. This is very simple, which means you can define the text in your posts elsewhere or dynamically replace the text created by another module.
- It makes automatic insertion of data appeals in different places.
- Users can write custom processors.
- You can replace tags in the post with pre-defined text.
- It is Fully localized.
- Apply processing functions to pre-defined text to perform additional functionality.
Head & Footer Code
Head & Footer Code is the best WordPress plugin for Code Snippets. You are told to add some custom code to the page (site verification code, custom styles, Webfont link, etc.), pre or immediately Opening, but you are not a programmer. Then you can use the head & footer code. If you need to insert some custom code specific to the individual article, you can use the Article specific meta box when editing the post/page/custom post type.
- Select which post types to enable the article-specific head/body/footer fields
- There is a site-wide section under Tools> Head & Footer Code
- Set article-specific custom content for the footer page section.
- Select the preference of the custom code printed for the head/body/footer sections.
- If you set the WP_DEBUG constant to true in wp-config.php, you’ll see site-wide and article-specific entries enclosed in comments in the page source code.