Using WP Code Snippets in WordPress

3d Animation

I’m quite new to the WP Code Snippets plugin for WordPress, and it’s amazing. I’m only using the FREE Lite version, and so far it does everything I need. If you want to add a block of HTML or a Script to various places across a site, this is the plugin to use. In most cases, this works better than creating widgets.

One of the first things I needed it to do was to place Code Snippets (or blocks of code) in my WordPress Template files. This is a super simple process!

In the example below, 1234 is my Code Snippet Short Code


<?php echo do_shortcode('[wpcode id="1234"]'); ?>

Adding to a post or page within WordPress is even easier


[wpcode id="1234"]