Shortcode Generator

The WordPress shortcode generator was the first tool in Coveloping's WordPress range dedicated to helping you generate code for your WordPress site.

This tool allows you to easily create all the code you need to create a shortcode to use on your WordPress site.

What Are WordPress Shortcodes?

WordPress shortcodes were introduced in WordPress version 2.5 and is a great way of adding full flexibility and control of certain functionality to the editor of your WordPress CMS. The best thing about shortcodes is that it allows editors to run a certain bit of code within the content area of your site. Having the ability of adding shortcodes means that the editor can also select the position to place this bit of content.

Shortcode Generator

The WordPress Shortcode Generator allows you to easily create all the code you need to create a shortcode to use on your WordPress site.

The presets you can use straight away are:

  • [ audio ]
  • [ caption ]
  • [img]
  • [link-to-post]
  • [antispambot-email]
  • [recent-posts]
  • [embed-gist]
  • [rss-only]
  • [paypal-donate]
  • [logged-in-content]
  • [search-form]

The Shortcode generator is split into three parts the shortcode definition, the attributes and the code.

First we need to define the name of shortcode and the name of the function that will run the code.

To be able to customise how your shortcode behaves and changing variables within your shortcode you have the ability to add attributes to the shortcode. When the shortcode runs it will have access to these attributes as variables in your code. Using the shortcode generator you can add as many attributes as you want to the shortcode.

The next section allows you to enter your PHP code which will run where the shortcode is placed in the content.

Templates

You can either use this tool to create your own WordPress shortcodes or you can select one of the template shortcodes to use in your WordPress projects. You can select one of the following:

  • Audio - Add HTML5 audio tag to your page
  • Caption - Add HTML5 caption tag to your page
  • Image - Add image tag with generic tag structure to your page
  • Link to post - Easily link to a post within the content
  • Antispambot email - Display a email link on the page
  • Recent posts - Create a list of the most recent posts in your content
  • Embed gist - Allows you embed a gist to the site from an ID
  • RSS only - Allows you to create RSS only text
  • Paypal donate - Create a link to donate stuff to paypal
  • Logged in content - Create content that can only be viewed from people logged into your site, perfect for membership style sites.
  • Search form - Easily add a search form to the page where the shortcode is placed

Sign up now for your free trial

Join Coveloping membership from $4.99 a month and get your first month free, cancel at any time


Start Now

Need help with your website? Hire a coveloping freelancer - fill out our quick form with your requirements and we'll get back to you with an estimate and availabilty. Find out more...

Code Copied!