Shares

Shortcoder Updated ← Wordpress Plugins

- 19,224 views - 76 Comments

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.

Download,http://downloads.wordpress.org/plugin/shortcoder.zip

  • Features
  • Installation
  • Videos
  • Screenshots
  • Live Demo
  • Docs & Change Log
  • Download

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.

Current version: 3.3

Features

  • Create “custom shortcodes” easily and use them within WordPress
  • Use any name for the created shortcode (ex: [sc:youtube])
  • Use any kind of HTML as Shortcode content.
  • Parameters can also added to HTML (ex: <strong>%%mytext%%</strong> [sc:testing mytext="hello"] )
  • Visual editor avaialble, so useful for beginners.
  • tinyMCE button avaialble in the editing toolbar so no typing required to insert the shortcode.
  • Globally disable the shortcode when not needed.
  • Can disable the shortcode, showing it to the 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: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 of the shortcode"] in your post. ex: If "youtube" is the shortcode name, then just use [sc:youtube] in your posts
  7. That’s all !

Demo video

Screenshots

Download

Click the link below to download.

Donate and Support with PayPal

If you find my products useful, then just donate and support my work. It will be an encouragement !

$

Docs

Changelog

3.3

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

3.2

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

3.1

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

3.0.1

  • Maintenance release

3.0

  • 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.

2.3

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

1.3.1

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

1.3

  • Initial Version with 5 inbuilt shortcodes.

(Pre made versions are not released)

  • http://ehaqui.com Lucas

    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

    • http://www.aakashweb.com Aakash Chakravarthy

      Yes, its my fault. I will clear it and update it soon !

  • http://ehaqui.com Lucas

    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

    • http://www.aakashweb.com Aakash Chakravarthy

      Yes, its my fault. I will clear it and update it soon !

  • http://www.5starwindowcare.com curt

    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?”

    • http://www.aakashweb.com Aakash Chakravarthy

      Please post you question clearly in the support forum

  • http://www.5starwindowcare.com curt

    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?”

    • http://www.aakashweb.com Aakash Chakravarthy

      Please post you question clearly in the support forum

  • http://www.aakashweb.com/ Aakash Chakravarthy

    Test

  • http://www.aakashweb.com/ Aakash Chakravarthy

    This looks really good

  • http://www.aakashweb.com Aakash Chakravarthy

    test

  • http://www.aakashweb.com Aakash Chakravarthy

    test

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

  • http://indygizmo.com alvin

    nice plugin but why it cannot create unlimited short codes?

    • http://www.aakashweb.com/ Aakash Chakravarthy

      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?

    Thanks,
    Monty

    • http://www.aakashweb.com/ Aakash Chakravarthy

      Try deleting and re-installing the plugin. Hope this will work

  • 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?

    • http://www.aakashweb.com/ Aakash Chakravarthy

      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?

    • http://www.aakashweb.com/ Aakash Chakravarthy

      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 !

      • http://www.facebook.com/PatriciaReszetylo Patricia Reszetylo

        Any thoughts as to when this will be back up?

        • http://www.aakashweb.com/ Aakash Chakravarthy

          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 !! :D ;)

  • 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 

    • http://www.aakashweb.com/ Aakash Chakravarthy

      Thanks for using Shortcoder. The time delay for the next release is because the plugin re coded from bottom.

      But for please use this version. http://www.mediafire.com/?n93473bh0n327u7

  • http://www.aakashweb.com/ Aakash Chakravarthy

    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.

    Shortcoder: http://www.aakashweb.com/resources/downloads/shortcoder%20v3.0%20dev.zip

  • 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 :)

    • http://www.aakashweb.com/ Aakash Chakravarthy

      Thanks for trying the new version !!

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

  • slusatel

    Hi

    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?

    regards
     

    • http://www.aakashweb.com/ Aakash Chakravarthy

      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]

    • http://www.aakashweb.com/ Aakash Chakravarthy

      Opening closing tags are not required for the Shortcoder plugin.

  • http://twitter.com/dashaluna Dasha

    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.

    TYIA!

  • 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….

  • http://www.etcwd.com/ web design resources

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

  • http://www.etcwd.com/ web design resources

    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!

    Question:
    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

        hookendonweb,
      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:

         
          %%main%%
          %%sub%%
          %%content%%
          %%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 . “%%”;
                                $vales[$i]
                                $values[$i] = $v;
                            }
                            $i++;
                        }

            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.

  • http://twitter.com/LatestNewsAbout Latest News About

    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.”

  • http://twitter.com/LatestNewsAbout Latest News About

    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

    • http://www.aakashweb.com/ Aakash Chakravarthy

      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?

    Thanks!

  • Rik

    Hi,

    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.
    Thanks

  • 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

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