WordPress.com Shortcode


originally taken from http://support.wordpress.com/tag/shortcode/

WordPress.com is a type of shared environment, where all users are running off of the same software. This is great because it allows us at Automattic to update millions of blogs at the same time with a single click. It means we can fix bugs or offer new features very quickly, which is a win for you as users. Having all users running on the same software can also be dangerous. If we aren’t careful, one user has the potential to take down the entire site. So this is why we need to limit some of the things you post on your blog.

If you wrote some code or pasted it in from another web site and then it disappeared after publishing the post, the code is likely being stripped out. If you feel it’s being stripped out improperly or if you would like to suggest additional types of code we should allow, please contact support.

Next Page

Break posts and pages into several ones by using:
<!--nextpage-->

Custom Read More

Customize your “Read more” text on posts using:
<!--more But wait, there’s more-->

Contact Form

Allow people to email you by adding this to your posts or pages using:

[contact-form]

Embed YouTube Video

You can embed these on posts or pages.
See: http://support.wordpress.com/videos/youtube/

Embed Google Maps

You can embed these on posts or pages.
See: http://support.wordpress.com/google-maps/

HTML Tags

WordPress.com allows the following HTML code in your posts, pages, and widgets:

address, a, abbr, acronym, b, big, blockquote, br, caption, cite, class, code, col, del, dd, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, li, p, pre, q, s, span, strike, strong, sub, sup, table, tbody, td, tfoot, tr, tt, ul, ol, var

Check out W3 Schools for more information about what each of these HTML codes are used for.

If you are familiar with HTMl, you’ll notice that codes such as embed, frame, iframe, form, input, object, textarea and others are missing from the above list. Those codes are not allowed on WordPress.com for security reasons.

↑ Table of Contents ↑

Javascript

Users are not allowed to post JavaScript on WordPress.com blogs. Javascript can be used for malicious purposes. Your code and intentions may be perfectly harmless, but it does not mean all javascript will be okay. The security of all the blogs is a top priority and until we can guarantee scripting languages will not be harmful they will not be permitted.

If you need proof of what javascript can do, it has taken both MySpace.com and LiveJournal offline in the past.

You may want a bit of javascript and it may well be harmless but as soon as the system allows it someone will try and exploit it.

JavaScript from trusted partners, such as YouTube and Google Video, is converted into a WordPress shortcode when a post is saved.

↑ Table of Contents ↑

Flash and Other Embeds

Flash and all other embeds are not allowed in WordPress.com posts, pages, or text widgets. For security reasons we remove the tags needed for these to work. Your intentions may be innocent but someone somewhere would try to damage the site, affecting all of our users.

There are several safe ways to post Videos, Audio, and other items to your WordPress.com blog.

↑ Table of Contents ↑

Posting Source Code

While WordPress.com doesn’t allow you to use potentially dangerous code on your blog, there is a way to post source code for viewing. We have created a shortcode you can wrap around source code that preserves its formatting and even provides syntax highlighting for certain languages, like so:

  1. #button {
  2. font-weight: bold;
  3. border: 2px solid #fff;
  4. }

Wrap your code in these tags:

[sourcecode language=’css’]

your code here

[/sourcecode]

Any of the following can be used for the language parameter (using one is required):

  • cpp
  • csharp
  • css
  • delphi
  • html
  • java
  • jscript
  • php
  • python
  • ruby
  • sql
  • vb
  • xml

Code in between the [sourcecode] tags will automatically be encoded for display, you don’t need to worry about HTML entities or anything.

Alex Gorbatchev’s syntaxhighligher Google Code project was used to implement this feature.

Contact Form

Visit a video page on the Google Video site. Copy the URL from the address bar.

videos-google-video-url

In your blog’s Dashboard, go to Posts->Add New or Pages->Add New. Click on the Add Video button on the Upload toolbar.

videos-add-video-button1

Click the From URL tab. Paste the Google video URL into the Video URL box and type a Title. Then click the Insert into Post button.

videos-google-video-from-url

The Google video shortcode will be inserted into your post. Publish the post and the video will look like the one below

Kyle.tv

You can embed Kyte TV shows using the Kyte shortcode for WordPress.com. You can find the shortcode for a Kyte show by going to the embed page for a show (click on the “Embed this TV” link below a show). For example, here’s the embed page for Scobleizer’s Kyte show:

http://www.kyte.tv/channels/place.html?uri=channels/6118

You can see the WordPress.com embed code on the right hand side of the page:

[kyte.tv 6118]

If you paste that code into a WordPress.com post or page, you get this:

Note: Because Kyte provides live video streaming, chat and comments, many people use it to create live shows. If you embed a live show you might want to consider creating a separate page on your blog – for example you could call it “My Live Kyte Show” – and embedding the show there. That way your show will be permanently accessible from that page (if you were to embed it into a blog post instead, the show would scroll off the bottom of the page as you publish new blog posts).

LiveVideo

Visit the LiveVideo site and find a video. Copy the ID from the URL in the address bar:

videos-livevideo-url

Or from the embed section:

videos-livevideo-embed

The ID for this particular video would be F25406F905A64843B19E7CDC3CFD04A4. Copy the following shortcode into your post or page content. Make sure to replace the ID with the ID of the video you want to insert.

[livevideo id=F25406F905A64843B19E7CDC3CFD04A4]

After publishing your post, the video will look similar to the one below.

PodTech

Visit PodTech to find a video you would like to use on your blog. Click the orange Share button.

.

videos-podtech-share

Check the box for “Embedding in WordPress.com, set the options on the left, and click the Copy button.

videos-podtech-copy

Paste the code into a post or page on your blog. After publishing, it will look like the video below.

DailyMotion

Find a DailyMotion video you would like to use. Copy the embed code from the box underneath the video.

videos-dailymotion-embed

Copy and paste the code for the Embeddable Player into a text editor. Look for code like the following:

value="http://www.dailymotion.com/swf/k3nwRne64kGrLYQZVP"

Copy the ID, which would be k3nwRne64kGrLYQZVP in this example. In your post or page enter the shortcode with the ID replaced.

[dailymotion id=k3nwRne64kGrLYQZVP]

After publishing, the video will look similar to the one below.

Redlasso

Find a Redlasso video to use on your blog. Click the button with the triangle in the Redlasso video player.

videos-redlasso-triangle

Click the embed button.

videos-redlasso-embed

Click the button to copy the WordPress.com shortcode

videos-redlasso-copy

Paste the code into a post or page on your WordPress.com blog and Publish. The video will look similar to the one below.

Splashcast

Visit SplashCast to find a video you would like to use. Many of the video channels have options on the right for posting the video directly to your WordPress.com blog.

If you know the playerID, such as CLIW1846SO, you can use the following shortcode in a blog post.

[splashcast CLIW1846SO]

Vimeo

, ,

Visit the Vimeo site to find a video you would like to insert. Copy the URL or video ID from the address bar.

Insert the shortcode into your post or page using one of the following formats. Make sure to replace the URL or ID.

[vimeo http://vimeo.com/240975%5D

or

[vimeo 240975]

The default width and height of the embeded video is 400×300.

Additionally you can specify the width and height, ex:

[vimeo http://vimeo.com/240975 w=500&h=400]

After publishing, the video will look like the one below.

Vodpod

You can post just about any video to your WordPress.com blog using VodPod’s “Post to WordPress” button. The “Post to WordPress” button will work on just about any site that offers Flash video with an embed code.

videos-vodpod-button

If you’re a Firefox user, there is an add-on that goes right on your browser.

Video

Watch the “The VodPod video widget – videos in your WordPress.com sidebar” video from WordPress.tv.

YouTube

Visit a video page on YouTube. Copy the URL from the address bar.

videos-youtube-video-url

In your blog’s Dashboard, go to Posts->Add New or Pages->Add New. Click on the Add Video button on the Upload toolbar.

videos-add-video-button1

Click the From URL tab. Paste the YouTube video URL into the Video URL box and type a Title. Then click the Insert into Post button.

videos-youtube-insert

The YouTube video shortcode will be inserted into your post. Publish the post and the video will look like the one below.

Odeo Audio Player

You can use a shortcode to embed an Odeo audio player.

Go to the Odeo website and go to an audio player page – for example a DJ Nicky T , Fatboy Slim vs Shaggy mashup

Copy and paste the URL in your address bar, it should look like this:

http://odeo.com/audio/1233398/view

And write it out like this

[odeo=http://odeo.com/audio/1233398/view]

Then you will get a nice audio player like this:

RockYou Slideshows

Visit RockYou to create your slideshow. After everything is configured, click the Save button.

slideshow-rockyou-save

On the next page, select WordPress.com from the list on the left. There will be two options for posting to your WordPress.com blog.

slideshow-rockyou-code

If you use the first option the slideshow will be automatically published to a new post on your blog. If you would like to control the posting, copy the code in the second box and paste it into a post or page on your blog. After publishing, the slideshow will be similar to the one below.

Slide Slideshows

Visit slide.com to create a slideshow. After you’ve selected the photos and configured everything, click on the SAVE (get code) button.

slideshow-slide-get-code

You will have two different options for using the slideshow with WordPress.com.

slideshow-slide

If you use the first option the slideshow will be automatically published to a new post on your blog. If you would like to control the posting, copy the code in the second box and paste it into a post or page on your blog. After publishing, the slideshow will be similar to the one below.

SlideShare Slideshows

Visit SlideShare to create your own slideshow or find one that already exists. When viewing the slideshow page click the WordPress logo beneath it.

slideshow-slideshare-options-link

The area will expand, showing a section with a code starting with ‘[slidehshare id=…’. Copy this code.

slideshow-slideshare-wpcom

Paste the code into a post or page on your blog and Publish. The slideshow will look similar to the one below.

>

7 thoughts on “WordPress.com Shortcode

  1. word press only shows the code on my page, not the slide show. I followed instructions but only text code shows. what am i doing wrong.
    host: fatcow…. using wordpress via fatcow.com…. found SLIDE slideshow, copied and pasted code into html in wordpress and nothing.
    Do I need a open and close tag or something.

    help.\

    rocki

  2. You need to have a great amount of enthusiasm and flexibility in order to become a favorite photographer at events.
    This beginner photography article on common abbreviations and acronyms will help you understand
    popular photography terms and direct you to helpful articles for a deeper look.
    Try to include these things to help bring out this excellent portrait.

  3. There is absolutely nothing a ton improved than a moveable, very
    affordable, attractive as well as a sturdy clothes rack,
    which comes with effortless installation but however looks suited for your
    wardrobe. It certain seems unattainable to get 1 of these fantastic hangewrs but Pricehanger.com has made it achievable to get
    all these options offered in a person item.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s