WPAds

Post Snippets: Must Have WordPress Plugin for Inserting Shortcodes

Make Your Own WordPress Shortcodes

For years I had been using a plugin called WPAds for inserting all kinds of HTML and Javascript code like affiliate banner ads and Adsense into my posts on the HTML tab editor.  But with some recent WordPress update, switching back to the Visual tab would strip them out.  So fricking annoying.  Also, it started escaping double quotes with a backslash when adding or updating the ad units and that broke them.   (There’s a fix on that page.)  It was also a pain in the butt that every time I wanted to use an ad, I had to go to WPAds control panel and copy the code to paste it into my post.  So today I had enough and looked for a plugin allowing me to create my own shortcodes.  I found one.

Post Snippets
by author Johan Steen, a CG Artist

Post Snippet Plugin - Button to insert shortcodes into a WordPress post or page.Switching between Visual/HTML editor tabs will not erase what was inserted.  That’s so sweet.  The code is inserted into your post via a button on the editor toolbar.  In the interface, the code snippets are represented by tabs.  Just click on the tab you want to use.  If you set up variables, fields will appear on the screen for you to enter the values.  Ideally, the screen should be more compact by using a drop-down list instead of tabs, but hey, it inserts the shortcodes.  On a high level, here’s how it works.

Post Snippet control panel

  • Post Snippet displayTitle:  Give your snippet a title.  I found out you can’t use spaces.
  • Variables:  If your code has replaceable variables, enter a comma separated list.  If not, leave it blank.  Reference the variables in your code with {curly braces}.  You can even use it for inserting adhoc text.
  • Snippet Type:  Select the type of snippet you want to create, a shortcode or a quicktag.  A shortcode will create a shortcode.  Doh!  A quicktag will actually insert the raw HTML code snippet into your post, but it does it hella stealth.  The banner or whatever will appear on the Visual editor, but if you switch to the HTML tab, wa-la! there’s the code.  Cool.   These are check boxes, but they’re not working right for me.  I used to be a programmer, so I know the difference between check boxes and radio buttons.  They’re acting like radio buttons.  If you check nothing, it defaults to quicktag.  If you check either shortcode only or quicktag only, the appropriate one will be used.  However, if you check both, I would assume that you would be able to select which option to use when inserting the code, but no choice is given.  It’s defaulting to quicktag.  FYI:  Ideally, use shortcodes because if you make changes to the code, it will change all occurrences globally throughout your blog.  Not so if you insert the raw code using quicktags.
  • Snippet:  The actual raw code you want to have executed.
  • Description:  Your own little note, only seen on the admin page.

Download it from WordPress.org:  http://wordpress.org/extend/plugins/post-snippets/
Author’s website with documentation:  http://wpstorm.net/wordpress-plugins/post-snippets/

After reading the comments on the author’s site, I can see this is a work in progress and he’s improving on it over time. For now, it’s doing what I need it to do and that’s all that counts.  Thanks, Johan.  This is a sweet plugin.

Share
iPage cpanel - Affordable, E-Commerce Enabled, 1-Click WordPress Installs

Archives

Blog Theme Generator

Artisteer - #1 Blog Theme & Web Template Generator

Get Free Traffic

Blazing fast WordPress hosting. Host unlimited sites on unlimited hosting space. Free domain & setup. Only $3.95/mo.