Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place.


  • Create “custom shortcodes” easily and use them within WordPress
  • Use any name for the created shortcode (ex: [sc name="youtube"])
  • Use any kind of HTML as Shortcode content.
  • Parameters can also added to HTML (ex: <strong>%%mytext%%</strong> [sc name="testing" mytext="hello"] )
  • Visual editor for adding shortcode contents.
  • Global tinyMCE button available in the editing toolbar for inserting created shortcodes.
  • Globally disable the shortcode when not needed.
  • Can disable the shortcode, showing it to admins.

An example usage

  1. Create a shortcode named "adsenseAd" in the Shortcoder admin page.
  2. Paste the adsense code in the box given and save it.
  3. Use in your posts and pages.
  4. Tada !!! the ad appears in the post.
  • Using this idea, shortcodes can be created for frequently used snippets.
  • You can also add parameters (like %%id%%) inside the snippets, and vary it like [sc name="youtube" id="GrlRADfvjII"]
  • This plugin will be hugely useful to all !!

Installation and Usage

  1. Extract the zipped file and upload the folder Shortcoder to /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Go to the "Shortcoder" admin page. Admin page is under the Settings menu.
  4. Enter a shortcode name.
  5. Paste some code in it.
  6. Then use the shortcode [sc name”name of the shortcode”] in your post. ex: If “youtube” is the shortcode name, then just use [sc name=”youtube”] in your posts
  7. That’s all !

Demo video


Buy me a coffee !

Buy me coffee !

If you like this work and found this useful buy me a coffee ! your donation will motivate me to develop and support this work.


Documentation is written in a separate page. Please check that here.



  • Fixed Shortcoder not working in WordPress 4.4
  • Changed the shortcoder syntax from [sc:the_name] to [sc name="the_name"] permanently in effect of WordPress 4.4 changes.


  • New feature: Embedded/Nested shortcodes is now supported.
  • New feature: Full fledged native WordPress editor for adding shortcode content with media buttons.
  • Bug fix: “duplicate percentage” in content on plugin reactivate.
  • Updated admin UI with fixed errors.
  • Updated “insert shortcode” interface is revised and some issues are fixed.
  • Updated with translatable texts in admin page.
  • Minor code revision and changes.


  • Fixed bug in loops using foreach.
  • Fixed several PHP notices.


  • Moved the shortcoder admin page to the “Settings” menu.
  • Some admin page issues are fixed.


  • Changed the “Custom parameter” syntax from %param% to %%param%%
  • Code revision.


  • Maintenance release


  • Plugin code rewritten from scratch.
  • Shortcode syntax is changed.
  • Supports any custom parameters.
  • Admin interface is redesigned and easy to use.
  • Added a tinyMCE button to the editing toolbar for inserting the shortcodes in the post.


  • Can disable the shortcode to Administrators.
  • Admin interface changed.


  • Changed the folder name’s case and some minor bugs.
  • Code revision.


  • Initial Version with 5 inbuilt shortcodes.

(Previous versions are not released)

Add your comment 116 Comments so far

  • Tem um erro, que eu consertei deixando-o assim, “include_once( ABSPATH. ‘wp-content/plugins/shortcoder/shortcoder-inbuilt.php’);
    “, Pos testava com o nome em caixa alta

  • Tem um erro, que eu consertei deixando-o assim, “include_once( ABSPATH. ‘wp-content/plugins/shortcoder/shortcoder-inbuilt.php’);
    “, Pos testava com o nome em caixa alta

  • It won’t seem to upload to the plugin page and when I tried to do the upload of the ZIP file, it just says: “Are you sure you want to do this?”

  • It won’t seem to upload to the plugin page and when I tried to do the upload of the ZIP file, it just says: “Are you sure you want to do this?”

  • Test

  • This looks really good

  • test

  • test

  • Pingback: Shortcoder – Wordpress Plugin – Aakash Web | MileHighTechGuy > Productivity Tools & Technology()

  • nice plugin but why it cannot create unlimited short codes?

    • being the second version, it has limited features… the forth coming
      versions will get this feature

  • Montypatterson

    I installed the shortcoder plugin in my WordPress/Thesis website anmd recieved the following warnings:

    Warning: Cannot unset offset in a non-array variable in /home/montyp53/public_html/wp-content/plugins/shortcoder/shortcoder.php on line 225.
    I got the same warning for /shortcoder.php on lines 227, 228, 229, 230, 231, 232, and 233.

    What does this mean and what should I do?


  • Kevin Geary

    How do you wrap something in a shortcode? Is there a feature that will create a “close” version of each shortcode? For instance, if I’m using it for a pull quote, I would create a pullquote shortcode and then write the content for the pullquote. But how do I close the shortcode after the content? I have to make another shortcode that just closes the div or paragraph? so I need two shortcodes for every shortcode that requires opening and closing?

    • There is no need to create a Closing shortcode . Only one shortcode is enough for creating a Pull quote. As of the instance, in the shortcoder admin page, create a shortcode named “pullquote” and give content as <p><blockquote> %misc1% </blockquote></p>

      Then in posts, use as [sc name="pullquote" misc1="YOUR CONTENT GOES HERE" ]

      Here, you can see that the misc1 parameter will be replaced by the quote content you enter. Thats all !!

  • Paul Dworianyn

    I love this plugin, why is the download link broken?  Did you decide not to offer it anymore?

    • The plugin has an XSS issue. So the plugin is temporarily disabled. I am working on it to fix that issue. After that, the plugin will be online !

      • Any thoughts as to when this will be back up?

        • I am having the v3.0 beta.. it is looking awesome… but still working on it to add some more features.. do you want the alpha version to download now ?

          • Skilowg

             Hi I’m also eagerly awaiting the re-release of your awesome Shortcoder plugin. Could I too, possibly be able to download the alpha version?

          • Oliver

            Me, I’ll wait for the stable version, props for your useful plugin 🙂

            And when you’ve finished blushing, BACK TO WORK !! 😀 😉

  • Anonymous

    Awesome plugin, I use it for advertising, I look forward to the new version. Will it by chance include an alphabetical listing of Shortcode Names? I have around 200 I use now and it has gotten difficult to find them in the list when I want to edit them or even check if I have the shortcode already.

  • Mr L

    Hi Aakash, have you fixed the plugin yet. I need to download the plugin again, my site got hacked so I’ve had to delete everything and reinstall. Your plugin was used significantly on my site, so I’m desperate to get it up and running 

  • Hello Oliver,

    I’m really sorry for anything that happened to your site. As per your request here is the link to the Shortcoder v3.0.

    It will be released soon once the docs, demo video and other things are finished.


  • Pingback: Shortcoder v3.0 released - Blog - Aakash Web()

  • Pingback: WordPress Plugin Releases for 4/27 : Wordpress News()

  • Pingback: WordPress Plugin Releases for 4/27 | Wordpress Themes()

  • Oliver

    Thank you very much for the new version, working flawlessly 🙂

  • Pingback: WordPress Plugin Releases for 4/27 | Rockinfrnz Archive()

  • slusatel


    Where can I change the maximum number of shortcodes (for version 2.3)?Also, if I upgrade to 3.0 will all the shortcodes be transferred?
    Thanks for a great plugin!

    • slusatel

      For someone that might need it – inside shortcoder.php, edit line 593
      replace 21 with the needed shortcodes (31,41..)

    • slusatel

      For someone that might need it – inside shortcoder.php, edit line 593
      replace 21 with the needed shortcodes (31,41..)

  • Pingback: Плагин Shortcoder или как создать короткий код()

  • Dragos

    Shortcoder is great plugin, is there any chance that editors can view and edit short codes, I tried to modify script but no lucky?


    • You just need to click the shortcodes available from the list in the admin page.

  • Yudkoren

    How can I create open and close short codes tags?
    ex:[shortcode] and [/shortcode]

    • Opening closing tags are not required for the Shortcoder plugin.

      • Yea… that’s the problem, I need a shortcode plugin for wordpress that uses open and close tags

  • Hello, I came across your plugin, it’s very good! How can I delete a shortcode if I created it by mistake or don’t need it anymore. “Temporarily disable this shortcode” doesn’t seem to work and I don’t want to have redundant shortcodes if I know I’m not gonna use them again. I hope that makes sense. 
    Thanks 🙂

  • Cm_Rox

    Hmmmmm AaKaSh The HaCker 

  • Shrikant Dhule

    This plugin is superb sir… it help me lot….

  • Manojghote

    can i add php code in shordcode box

  • JonnyDee

    I have 3.4.1 installed, and saw this after the activation: 
    The plugin generated 183 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin. 
    I have not seen anyone else mention it, and would appreciate feedback. Plugin was dl direct from this site.


  • JonnyDee

    Now, I notice the following in the bottom of the shortcode admin panel

    Warning: Invalid argument supplied for foreach() in /…/wp-content/plugins/shortcoder/shortcoder.php on line 261
    and I can not see anything wrong at the line or above it 🙁

    • Robb Luther

      I have this too….

  • hello,
    is any chance to use this shortcoder into VALUES from CUSTOM FIELDS ?
    thank you!

  • there is another problem with this plugin.
    i have a wordpress template classifieds and this template is not using posts, it use his own system called ads so the permalinks are url/ads/title-post
    i created an shortcode and when i try to insert using shortcoder button, it doesnt add the line into the post. if i am doing this into normal post, it works. how can i fix this ?

  • hookendonweb

    You are brilliant, what a great design!

    I need to add a shortcode as an attribute.

    For example:
    sc: [embedVideo=”[S3VIDEO file=’module1.mp4′ bucket=’products’]”]

    I tried  wrapping the embedded shortcode with ascii for the brackets…[ and ] but it did not work.

    Any thoughts on how to pass a shortcode as an attribute in your shortcode plugin?

    I thought I could add some code to check the first and last character of every attribute is a bracket but I don’t know what to do as the conditional results…if brackets then do this..or if that is even the best approach.

    • Dragos

      I think you do not understand how this great plugin works. Add new shortcode, in html box of shortcoder put usual html code for your video, whole code, Now, instead of real link of video for example http://yourdomain/video2.mp4  put %myvideo% and save shortcode. When you create page or post, click on shortcoder icon in Visual editor, choose proper shortcode and there will be atribut myvideo. Fill atribut value (http://yourdomain/video2.mp4) and that’s it. Save page, and preview it.Dragos

      • hookendonweb

        I understand how the plugin works and how great it is. However, I have a plugin that uses a shortcode to call media that is stored at amazonss3. This plugin encrypts the amazon media link so that the link can not be copied or the media can not be accessed and distributed. I use this media plugin to manage and protect my media as part of a paid wordpress member site.

        To use the %%do this%% will not invoke my media plugin properly. That is why I need to pass my media shortcode inside an attribute of your shortcode.

        I have not tried building my sortcode into your shortcode so all I would have to do is pass the attributes of my media shortcode. For example,

        [S3VIDEO file=’%%videoname%%’ bucket=’$$bucket’]

        Not sure if this will work but it would be so much easier to manage if I could pass my media shortcode in whole as an attribute within your shoutcode. Otherwise every time I need to pass a new media attribute I would have to edit the short code in you plugin.

        For example, this is what I would like to do:

          %%medialink%%  // this would be my media shortcode [S3VIDEO file=’module1.mp4′ bucket=’products’]

        How your plugin will come into play is, I can make various product templates to display my paid products within a paid member site. I can set up the various attributes for %%prodcutName%%, %%diskNumber%%, etc. and then %%myMediaS3shortcodeLink%% to display the right video or audio for that specific product.

        • hookendonweb

           p.s. I am not a great coder but should be able to handle code changes. I was hoping you could help get me started or if you had some genius idea. In the past I ran across some posts explaining that your could pass a shortcode within another shortcode but they never explained how.

          I have looked over your word and java plugs and its clear, especially after using your shortcode plugin that your REALLY know your stuff.

          I was blown away with this plugin and can not see why yo do not have 500,000 or more downloads.

        • Dragos

           I understand you, I have similar plugin,

          so U have 2 choices here to pay or ask for plugin modification (U do it now) or , I do not see problem at all to have 2 divs or 2 columns or else, in one column there is shortcoder shortcode ( for prodict name, desc…) and another column is protected S3 shortcode.

          Are code in one or i 2 brackets it is not isue, U need to do your time. Understand my point?

          U do not need all things in one basket 🙂

          • hookendonweb

            I think I have found my answer which is to wrap $sc_content_rep2 in do_shortcode() where the shortcoder() function is returned. For example:

            return do_shortcode($sc_content_rep2);

            However, there seems to be a problem before the shortcode I place in %%medialink%% passes into the do_shortcode() function.

            The problem seems to be when the attributes are put into an array and divided into $keys and $values.

                        foreach($atts as $k=>$v){
                            if($k !== 0){
                                $keys[$i] = “%%” . $k . “%%”;
                                $values[$i] = $v;

            When $values[$i] encounters the first square bracket that is passed in %%medialink%% this is what happens:

            key: %%maintitle%% value: This is the main title
            key: %%subtitle%% value: this is the subtitle
            key: %%content%% value: this is content
            key: %%1%% value: medialink=”[S3VIDEO
            key: %%file%% value: yogasales.mp4
            key: %%bucket%% value: cardiac-yoga

            The value that was passed via %%medialink%% is [S3VIDEO file=’yogasales.mp4′ bucket=’cardiac-yoga’].

            Notice how a new key and value is created everywhere there is a space in the value.

            If I remove the square brackets this is what the array generates:

            key: %%maintitle%% value: This is the main titlekey: %%subtitle%% value: this is the subtitlekey: %%content%% value: this is contentkey: %%medialink%% value: S3VIDEO file=’yogasales.mp4′ bucket=’cardiac-yoga’

            I can not figure out why the square bracket triggers the array to read everything after the bracket that has a space is assigned a new key and value.

            Any thoughts?

            I really think being able to pass shortcode as in attribute within your short code plugin should be a standard feature.

            On another note, how do I get a quote on having a different modification made to the plugin?

            I desperately need to be able to add an advanced button when setting up a shortcode that allows you to select the input type. For example, If I add an attribute for where you add large amounts if text (say few paragraphs) I want to change it type=text to textarea. Its just to difficult to when you are dealing with a text input box that is 100px long.

            I also want to be able to do select boxes, radio bustton…basically all the normal form input options.

  • Hi,

    I have always used shortcoder successfully,

    however, i did some new installs and got the following error (no plugins besides akismet installed):

    “The plugin generated 168 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

  • Warning: Invalid argument supplied for foreach() in /home/lna3107/public_html/wp-content/plugins/shortcoder/shortcoder.php on line 263

  • Pingback: Encoding email address in wordpress posts - Articles - Aakash Web()

  • Pingback: using Wordpress and Photocrati to build a web site()

  • Dino-User

    Hi, If I delete a shortcode (by dragging it to the trash) it actually does nothing- in all the posts that used it, it still appears. Shouldn’t it delete it from them? (i tried clearing the cache both of the browser and wordpress). thanks

    • It should. It will be automatically removed. Just refresh the page.

      When the shortcode is dragged and dropped, the page will automatically refresh. If it doesn’t then there are som JS errors due to other plugins in the admin page.

      Thank you.

  • Alex

    Hi, great plugin! Really helpful.

    I do have a question about it – is there any way I can export the shorcodes from the plugin and then import them on another website?


  • Rik


    Is it possible to post some php snippets with this plugin. It would be perfect.

    any ideas?

  • Pingback: Web development resource page | Create the Work You Love()

  • Kimberly

    Hi, How can I make the [/] shortcode blue button work globally? Right now it only shows for the admin.

  • Adrian Toma

    very useful!
    PS: How about a shortcode in shortcode ?

  • Adrian Toma

    2nd / maybe also a suggestion … is it possible to create [youtube] instead of [sc:youtube] ?

  • Pingback: using Wordpress and Photocrati to build a web site()

  • Mars

    All the docs links are broken !!!!

  • Jomez

    Is it possible to add a button for uploading images to the shortcoder form?

  • Pingback: The Aerial Arts & Fitness Association | KodieG()

  • Pingback: WordPress Shortcoder Plugin()

  • Pingback: Shortcoder - A plugin for creating your own custom Wordpress shortcodes | SimplyPeachy()

  • Hi, if you transfert your blog, and shortcode dont appear in new web host, create a new shortcode (test), with just “text” or what do you want, save, and old shortcode appear.

    • Ben

      it’s not working for me after creating a test shortcode. I’m on the same hosting path, i just resinstall a backup of my database and all shortocdes disappears.
      – When i reinstall the plugin, the table are not recreated (even if i drop them before reinstall, they are not recreated)
      – When i create a test shortcode, it is not saved in the database and disappear after refresh.

      Have you an idea ? I’m on wordpress 4.1

      Thank you !

  • Pingback: Die 10 wichtigsten WordPress Standard-Plugins | lolliblog()

  • Man, congratulations! This plugin is so incredible that it should come pre-installed on WordPress. Thank you very much!

  • Sand Merch

    Can you please update this amazing plugin

  • Timothy

    Plugin borked with WordPress 4.4, PLEASE FIX ASAP

    • johnny

      Yes same here – this plugin is HUGELY important to our site. Will donate AGAIN if you can get this fixed. RIght now I am totally screwed.

    • All, please refer the above comment for the fix. Thx !

  • ForoGames

    WordPress 4.4 Plugin broken, PLEASE SOLVE

  • WordPress 4.4 – Issue – Fix:

    Hi All, To make shortcoder work in WordPress 4.4 please add the below code in any of your WordPress php file.

    Example files:

    wp_contentthemes{active_theme}functions.php (or)


    function sc_replacecolon( $content ){ return str_replace( ‘[sc:’, ‘[sc name=’, $content ); }
    add_filter( ‘the_content’, ‘sc_replacecolon’, 5 );

  • WordPress 4.4 – Issue – Fix:

    Hi All, To make shortcoder work in WordPress 4.4 please add the below code in any of your WordPress php file.

    Example files:

    wp_contentthemes{active_theme}functions.php (or)


    function sc_replacecolon( $content ){ return str_replace( '[sc:', '[sc name=', $content ); }
    add_filter( 'the_content', 'sc_replacecolon', 5 );

    The issue:
    WordPress 4.4 stopped recognizing shortcodes with special characters like “:, =” etc in tag names. The code above replaces colon with the name=”” attribue which shortcoder supports.

    Please share this fix with your friends until an official fix is published


  • Yamado

    Not working for me man. Tried in both functions.php and shortcoder.php. This possibly something to do with theme? I use Mesocolumn.

    • Yes, in my template Mesocolumn patch also does not work

    • It should work. People have reported that the fix works. Please check the same after disabling any caching plugins.

      • Yamado

        Maybe it works in posts, but I insert my shortcodes via the theme’s built in code inserter. Not working for me with current patch. For now have hardcoded adsense into the single.php. Hope to see a true fix for shortcoder soon.

  • Pro Tips

    Not working for me at 100%
    Your solution works with WP standard editor (page and post) but not anymore with my builder : Beaver Builder
    Can you advise me ?

  • Michael Duff

    Not working with Avada. Real problem.

  • awesome! the fix worked for me. Thanks so much Aakash for developing this plugin! I really love this plugin and seriously can’t live without it. it really is incredible and does wonders for me. please keep up the good work! 🙂

  • Andrey

    not working: [sc:my_html]
    working: [sc name="my_html" ]

  • Andrey

    This not working with my theme MesoColumn:

    wp_contentthemes{active_theme}functions.php (or)


    function sc_replacecolon( $content ){ return str_replace( ‘[sc:’, ‘[sc name=’, $content ); }
    add_filter( ‘the_content’, ‘sc_replacecolon’, 5 );

  • sever

    Not working Sortcoder – WordPress 4.4

  • Thank you, Aakash for this awesome plugin and the quick fix!
    +1 thx to Andrey below, [sc name="my_html"] works like magic.

  • why not add a option to replace the colon “:” with an underscore “_” to make it compatible with 4.4?

  • Thanks

  • Selena Darter

    This workaround isn’t working on one of my sites. I’ve tried Aakash’s original code in both functions.php and in shortcoder.php, I’ve tried changing the structure via PHPMyAdmin to the [sc name=""] syntax, and they all give the same result. I get this error:

    Warning: array_key_exists() expects parameter 2 to be array, boolean given in /wp-content/plugins/shortcoder/shortcoder.php on line 111

    Any thoughts on this?

  • Yestin Rowse


    I need to update my website to the latest WordPress as there is a major update today and have had to update Shortcoder and now the shortcodes are broken. We used Shortcoder so it was simple to update a lot of information on a lot of posts and now the plugin is useless until I can get a fix as I don’t want to have to update all the posts again and add in [sc name:] I can’t get the below code to work:

    function sc_replacecolon( $content ){ return str_replace( ‘[sc:’, ‘[sc name=’, $content ); }

    add_filter( ‘the_content’, ‘sc_replacecolon’, 5 );

    I have added it to my theme functions php file and have tried it in the Shortcoder.php file but wasn’t sure where it should go in the php so added it at the end.

    Is their any new updates so I can keep [sc:My_Shortcode] in the plugin or any new code that I can try to add to fix this.

    Can someone please help me, this is so frustrating!!

  • Yestin Rowse

    I still cannot get any of the below php code to work on my website.

    Can anyone help me update the plugin to work with the old shortcodes.

    I have the shortcodes on a lot of the pages and can’t really edit all the pages again.


  • Hudson Pham

    please help me. After upgrade to version 3.4.1 It’s bank page and cannot edit any more

  • eyedraw

    The main problem is you can’t delete shortcodes and when you rename them, it will simply create a new one… rather annoying. Other than that, nice plugin

  • Hello.
    Problem: I am using this plugin for some days now. First it worked well and I created 4 shortcodes for my website. But from the next day on, I was not able to create any new shortcodes or edit the existing ones. I can open the text field for editing, but if I click on “Update” or “Create”, nothing happens.
    I can still use and enbed the shortcodes I have.
    WP 4.5.2. No update was done since Shortcoder (v.3.4.1) is installed.
    Any idea? Thank you

  • Pingback: Shortcoder v3.4.1 released for WordPress 4.4 - Blog - Aakash Web()