Simply add the code below to your wp-config.php file:
define('FTP_HOST', 'ftp.yoursite.com');
define('FTP_USER', 'Your_FTP_Username');
define('FTP_PASS', 'Your_FTP_password');
define('FTP_SSL', true); // If you can use a SSL connection set this to true
Thanks to Jesse for this tip!
Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!
WordPress tip: easy upgrades using FTP

Have you ever had a time where you wanted to add some specialized content to your WordPress post or page, but weren’t sure how? Maybe you wanted to embed a Twitter widget or some content called back from some website or API. How can you easily add this type of content to your WordPress post? Fortunately, WordPress provides something called a shortcode to make this kind of task extremely easy. This tutorial will take you through the process of building, installing, and using a shortcode in your WordPress installation. Let’s start by seeing what a shortcode is.
What is a WordPress Shortcode?
Briefly, a shortcode is a special tag that you can enter into a post that gets replaced with different content when actually viewing the post on the website. If you have ever embedded a WordPress gallery on your blog, then you’ve already seen the built in short code .
When you load a blog page with the [gallery] shortcode, WordPress replaces the [gallery] shortcode with all of the code that actually displays a gallery of your images.
As you can see from the above example, a shortcode looks similar to an HTML tag, but is enclosed with square brackets instead of angle brackets. This code gets replaced with some other code when the page is actually loaded in a web browser. The really cool thing is that WordPress allows you to create your own custom shortcodes to display pretty much anything! You could use it to output a Youtube video, show your latest tweets, or even customize it however you like.
In case that doesn’t make sense, let’s look at an example. Let’s say I want to output an AdSense ad within my post. I could go into the HTML mode of the WordPress content editor and copy and paste the Adsense code block into it, but this would be tedious and potentially distracting with all the extra markup in my post. In addition, if I wanted to change the ad block, I would have to go back to each and every post to change it to the new one. An easier way and more reliable way to add the Adsense block wherever I wanted would be to use an adsense shortcode. The shortcode could look like this:
[adsense]
When actually looking at the post on your website, the shortcode would be replaced with the Adsense ad block. So how do you create this shortcode? Obviously, you need to tell WordPress what to replace the shortcode with somehow. Let’s look at that next.
How do I Create A Shortcode?
Fortunately, WordPress makes it pretty simple to make your own shortcodes, so let’s actually go about implementing the [adsense] shortcode. The first thing we need to do is define a function that outputs the actual Adsense code. All of the following code will go in functions.php in your theme (it could also go in a standalone plugin file). Got it? Ok, so let’s look at that function.
function get_adsense($atts) {
return '<script type="text/javascript"><!--
google_ad_client = "pub-546321545321589";
/* 468x60, created 9/13/10 */
google_ad_slot = "54321565498";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
'
}
This function is pretty straightforward – it just returns my Google Adsense code as a string. Whatever this function returns is what my shortcode will be replaced with, so I could potentially have returned the html for a Twitter widget, or a list of the child posts of this one, or anything else.
Now that we have a function that returns what we want, how do we hook that up to a shortcode? Now this is where the WordPress API comes in. Again let’s look at how we do it and then explain what’s going on. Here’s the call to set up the adsense shortcode.
add_shortcode('adsense', 'get_adsense');
That’s it! The first parameter passed in is the name of the shortcode, so in our case, ‘adsense’ tells WordPress to create the [adsense] shortcode. The second parameter designates the function that will be called when the new shortcode is encountered. Again, in our case, ‘get_adsense’ tells WordPress to replace [adsense] with the results of our get_adsense method.
Not too bad is it? Now this is a very simple shortcode, WordPress allows you to do much more with your shortcodes, including adding parameters (maybe you want to choose between adsense blocks?). The full API can be seen at the WordPress Codex.
How do I Use my Shortcode?
This last part is simple, just add the [adsense] shortcode in the HTML or Visual views of the Post or Page content editor. That’s it! You’ve created your first shortcode.
John Gadbois is the co-owner and technical lead at
Domain Superstar, a domain name tools site. He also runs CalculatorPro, a cool calculator sites with all sorts of financial calculators. He enjoys learning about and coding with Ruby on Rails, jQuery, WordPress, and PHP.
How to Add A Shortcode in WordPress? is a post from: WPBeginner which is not allowed to be copied on other sites.
Related posts:
- How to Display Ad Blocks in Specific Posts in WordPress
- How to Disable Automatic formatting in WordPress posts
- Slickr Flickr WordPress Gallery Plugin

We have received an insider news that WooThemes, one of the largest WordPress theme provider, has partnered up with another company to launch a product that will make their websites render in a “sexy way on iPhones & Android-powered devices”. We have mentioned 11 ways to Create a Mobile Friendly WordPress site, but this would be a new shift in the industry. Chances are that this new advancement will increase competition in the industry and encourage other commercial theme providers to do the same.
We are very excited about this new release coming. This news is not a rumor and was obtained from a source with knowledge on the subject. The official announcement should be released sometime this week.
Exclusive coupon for WPBeginner audience: 25% off on all themes – use “WPBEGINNER” as the coupon.
Update: This news is confirmed. The product is actually called Obox Mobile which costs an additional $50, and it is compatible with all WooThemes and Obox Themes
WooThemes to make their Themes iPhone and Android Compatible is a post from: WPBeginner which is not allowed to be copied on other sites.
Related posts:
- 15 Great Looking Free Portfolio Themes for WordPress
- WordPress Themes Made Easy with Adobe Dreamweaver CS5
- Top 10 Must Have iPhone Apps for Bloggers

This past weekend, Syed Balkhi (@syedbalkhi) from WPBeginner was attending WordCamp Birmingham. After arriving in town, Friday Afternoon, he had dinner with Tammy Hart (@tammyhart) and her family. She is an amazing person; an Automattic Certified WordPress Consultant; a person who really knows how to Freelance with WordPress. The event started on Saturday morning at University of Alabama where Syed Balkhi kicked off the Developer session with his presentation: How to Speed up WordPress and Boost Site Performance.
You should consider following our Slideshare account, so you never miss any presentations.
There were some amazing people there from the WordPress community. Few that stood out were: Andrew Nacin (@nacin), one of the WordPress core contributor. Samuel Woods (@otto42), the guy behind Simple Facebook Connect Plugin, Simple Twitter Connect and more. Mitch Canter (@studionashvegas) a very well reputed WordPress developer. Dougal Campbell (@dougal) one of the three most important people in WordPress history in Matt Mullenweg’s list.
All the Photos from WordCamp Birmingham 2010
This trip was kindly sponsored by MaxCDN. They gave us awesome T-Shirts and an exclusive 50% off Coupon “wcbhm10″ which you should use right now.

Þ‰A
WordCamp Birmingham 2010 (Overview) is a post from: WPBeginner which is not allowed to be copied on other sites.
Related posts:
- We will be attending WordCamp Birmingham
- WordCamp Fayetteville 2010 (Overview)
- WordCamp Raleigh 2010 (Overview)

What makes a great news website? A site that keeps people informed of the latest news and provides them with plenty of content to consume. Today’s top news websites offer videos and other dynamic content to their visitors to keep them coming back for more. You can do the same with TerranTribune for WordPress. It’s a top notch WordPress news theme that targets those who intend to start a highly professional news website with WordPress.

The theme’s design is quite attractive and very clean. It comes with RokNewsRotator Widget that helps rotate the news on your website in a dynamic fashion. TerranTribune is image and video friendly as well, so you can add your latest video posts or other information to your website easily. What’s impressive about this theme is the fact that it gives you 32 widget locations to work with. That means you are going to have the flexibility to change things around on your website and test new locations for your widgets without changing your code.

As you can see in the above image, you have plenty of places to fit your content into and add your ads to. The below image demonstrates the remaining elements of this theme as far as this theme’s structure is concerned.

The back-end is quite powerful too. You do not really have to do anything with your code to take this theme and run with it. Of course, if you want your website to look and feel unique to your visitors, you may want to make further changes. That goes without saying.

To sum things up. TerranTribune is a clean and dynamic news portal WordPress theme that works great for anyone who is planning to get in the online news business. It’s easy to customize and very flashy.