Code Snippets

Add code snippets including HTML, PHP, CSS and JS to your site easily without touching functions.php or child themes. Each snippet can be activated and deactivated individually, and even exported to a different site. A very handy plugin during WordPress site building.

Code Snippets Screenshot

Demo

This tiny code snippet has been added using Code Snippets

add_shortcode( 'DisplayPHPVersion', function () {
	$out = '<p>Current PHP version: ' . phpversion() . '</p>';
	return $out;
} );

And below the added shortcode is being used:

Current PHP version: 7.4.11 - snippet updated 2020-11-03

Extract from WordPress.org

Most snippet-hosting sites tell you to add snippet code to your active theme’s functions.php file, which can get rather long and messy after a while. Code Snippets changes that by providing a GUI interface for adding snippets and actually running them on your site just as if they were in your theme’s functions.php file.

https://wordpress.org/plugins/code-snippets/

Leave a Reply