WordPress Shortcode Generator Tool

WordPress Generator Tool

Need to send invoices?
Check out my new WordPress plugin HDInvoice
Limited time launch sale

  • Function generator for WordPress developers
  • WordPress Shortcode Generator Tool
  • Last updated: April 4, 2024
  • View tool

WordPress shortcodes are small little snippets of “code” that you can insert into any post, page, widget, or theme, to run advanced functionality or display dynamic content. Shortcodes are primarily used by plugins as a way to allow a site owner to add the needed functionality to wherever they feel works best. You can use this tool to generate the code outline for WordPress shortcodes.

Shortcodes come in two types: Self-closing, and Enclosing. Self-closing WordPress shortcodes look like [shortcode] and can contain “attributes” to pass through any variables. Enclosing shortcodes are used to wrap around some other content, such as [shortcode]some content[/shortcode].

You can also run a shortcode inside a theme or plugin by using the do_shortcode() PHP function. Example: echo do_shortcode('[shortcode]');. This is useful for running other people’s shortcodes in your theme or plugin.

You can use this free generator tool to create the basic code for your own shortcodes.

Generate Code


The shortcode tag. Example: [tag]

Self-closing: [tag]. Enclosing [tag]content[/tag]


Attributes are variables that can be included in your shortcode and can be grabbed by running $atts["attribute_id"]. An example shortcode with attribute is [tag id = "999"] where id is an attribute.


You need to select “Generate Code” in order to populate/update this.

Please note that these tools are intended as helpers for professional WordPress developers.
Use of any code provided here is at your own risk.