WordPress Code Snippet 2.0

Do you run a tutorial site? Or maybe you just want to post up a piece of code that you felt was a lifesaver? Now you can post multiple snippets of code anywhere in your page’s or post’s content with ease.

Installation

  1. Download the plugin, extract and upload it to your plugins folder on your server.
  2. Activate the plugin.
  3. Access the Code Library section.
  4. Create a new snippet and save.
  5. Return to the Code Library and select the “Code” link.
  6. Copy the code.
  7. Add or edit a page or post and paste the code into the HTML of the page/post where you want it to display.
  8. Publish or Save the page/post.

Usage

Following step 5 of the Installation instructions, you simply copy the HTML comment code and past it into the HTML of the post/page’s content. The code looks like the following:

<!–WCS[1]–>

Upgrading

If you are upgrading from version 1.0, you will see an option on the Code Library page that will
allow you to upgrade. As a precautionary measure, be sure to back up your database before doing so.

Changelog

Version 2.0

  • Major overhaul of version 1.0.
  • Moved code to a reusable code library so that it is no longer limited to one page/post.
  • Snippets can now be placed anywhere in the post/page’s content.
  • More than one snippet can be added to a page/post.
  • One click upgrade feature to upgrade from version 1.

6 thoughts on “WordPress Code Snippet 2.0

  1. Andrew says:

    This plugin is a lifesaver to those of us who need to post code related tutorials and snippets. Thanks for making this plugin available to the public.

    Reply
  2. Dylan says:

    I also love this plugin. Works awesome, finally one that shows the right syntax and formatting.

    Reply
  3. Andrew Fishwick says:

    I think its great, thank you. It is causing some validation issues though, I am not sure if you can work around this, or if it is my issue.
    I am using WordPress v3.04 and the tags are being wrapped with tags.
    ie:
    code example

    Reply
  4. Simon says:

    Used to use it – but causes admin login redirects on WP 3.1.3 (ie breaks admin.)

    Reply
  5. Allan Collins says:

    @Simon – This blog is running 3.1.3 and it seems to function just fine. Can you give me your URL and a list of other plugins running?

    Reply
  6. Jason says:

    Hi Allan, just tried a bunch of plugins and your’s was by far the best. I did discover a plugin conflict with 1-click Retweet/Share/Like. Personally your plugin was far more valuable so I deactivated 1-Click.

    Here’s the error:
    Warning: simplexml_import_dom() [function.simplexml-import-dom]: Invalid Nodetype to import in /home/username/public_html/wp-content/plugins/1-click-retweetsharelike/la-click-and-share-fb-meta.php on line 86

    Fatal error: Call to a member function xpath() on a non-object in /home/username/public_html/wp-content/plugins/1-click-retweetsharelike/la-click-and-share-fb-meta.php on line 87

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *