Saber Snippets is a free plugin for rendering code snippets in a WordPress site. It is a free WordPress plugin distributed under the GPL3 license.
Main plugin file. Provides a template_include hook to provide the single-snippet.php template for snippet posts.
Single page template default for singular snippet posts.
Saber Snippets is a free WordPress plugin distributed under the GPL3 license. Developers can download the source files or a distribution release from the public GitHub repo at https://github.com/saberwp/saber-snippets.
Extract the downloaded ZIP file to a folder on your computer.
Connect to your WordPress website using your web hosting control panel’s file manager.
Navigate to the /wp-content/plugins/ directory on your Wordpress site.
Upload the extracted Saber Snippets folder to the /wp-content/plugins/ directory.
Log in to your WordPress admin dashboard.
Navigate to Plugins > Installed Plugins.
Locate the Saber Snippet plugin in the list and click the “Activate” link.
Q2, April - June 2023
In the next release scheduled for ~end of March the plugin will contain the ACF field exports and will bundle the Code Field to support sites that do not have ACF Engine or another code field providing utility.
There are plans in place to add a snippets category custom taxonomy in order to enable users to better organize their code snippets.
Creating a Snippet
To create a new code snippet, follow these steps:
Navigate to Saber Snippets > Add New in your WordPress admin dashboard.
Enter a title for your code snippet.
Enter a description of the snippet in the Gutenberg content body.
Enter your code in the code editor area.
Click the “Publish” button to save your snippet.
Editing a Snippet
To edit an existing code snippet, follow these steps:
Navigate to Saber Snippet > All Snippets in your Wordpress admin dashboard.
Find the snippet you want to edit and click the “Edit” link below its title.
Make the desired changes to the snippet.
Click the “Update” button to save your changes.
Importing & Exporting
Snippets can be exported or imported using WordPress importer and exporter plugins. These are optional plugins that you can add to your site, look for them in the WP Admin under WP Admin > Tools.