Posts Tagged ‘wordpress’

SEO Must-have: How to Connect your WordPress Blog to Twitter

If you’ve got a WordPress blog and a Twitter account but haven’t linked the two, you’re definitely missing a trick. Twitter is an excellent way of promoting your blog posts to your Twitter followers because it provides both instant exposure to your content and an easy way for those followers to then ReTweet the link (the Twitter equivalent of the email ‘Forward’) to their followers. There’s no need to wait for Google to crawl the post and offer it up in its results to get your message in front of people – in fact, there’s a good chance you’re reading this from a ReTweeted post yourself.

With that in mind, let’s move on to the plugin that makes this integration so simple.

Twitter Tools

First you need to get Twitter Tools, the plugin that actually tweets your blog post in the first place. Download the zip file, extract it all to a folder and upload the folder to your site under ‘your-blog-name/wp-content/plugins’.

From the WordPress Dashboard, choose Plugins and notice that there are actually four separate plugins that are installed when you integrate Twitter Tools:

  1. Twitter Tools
  2. Twitter Tools – Bit.ly URLs
  3. Twitter Tools – Exclude Category
  4. Twitter Tools – Hashtags.

We’ll just be dealing with number 1, the main plugin. Click Activate, and then choose Settings to input your Twitter username and password. Set the ‘Enable option to create a tweet when you post in your blog’ drop-down to Yes. You’ll also want to set the ‘Tweet prefix for new blog posts’. This is what will be in the first part of the tweet, e.g.:

Bob’s Widgets: A great new range of widgets just launched! http://bit.ly/g45sA

Leave all other options as they are and save your details. Everything’s now set up and you should see your next blog post is instantly delivered to your Twitter account. The bit.ly integration in the example above is done automatically, which is nice.

WordPress Snippets on the Homepage

Congratulations, you have decided to install a WordPress blog onto your site. Now you can let people know about yourself and your company, information about your products and services, and any promotions or competitions you may be running. You don’t need to post seven times a day, but one post a week is a little on the light side as search engines LOVE regularly updated content, which is what makes blogs so beneficial in your seo campaign.

But you do not want your blog to be the star of your site, you want the attention to be on the homepage. The purpose of this post is to show you how to get the most recent posts from your WordPress blog and put snippets (usually the first 30 words) onto the homepage.

The first thing we need to do is include the WordPress functions so that we can use them to pull the blogs we want. Place this code near the top of the page and definitely before the next section of code.

<?php
define("WP_USE_THEMES", false);
include("blog/wp-blog-header.php");
query_posts("showposts=3");
?>

What this block of code says is “we will format the blogs ourselves (do not include the WordPress themes), fetch all the functions that I’ll need to use WordPress here, and I want to have the 3 most recent posts”.

Now comes to fun part. We are going to do a mini-version of WordPress’s The Loop.

“The Loop is used by WordPress to display each of your posts. Using The Loop, WordPress processes each of the posts to be displayed on the current page and formats them according to how they match specified criteria within The Loop tags. Any HTML or PHP code placed in the Loop will be repeated on each post.” – WordPress Codex

 <div class="blog">
  <ul class="blogposts">
   <?php while (have_posts()): the_post(); ?>
    <li >
     <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
     <p><?php the_content_rss('', false, '', 30); ?></p>
     <a href="<?php the_permalink(); ?>">Read more...</a>
    </li>
   <?php endwhile; ?>
  </ul>
 </div>

In our loop, we are creating an unordered list containing the title of the post as a link, the first 30 words and a ‘read more’ link.

Obviously you style the snippets to fit into your website’s design. You can see how we have incorporated our most recent blog and news posts on our homepage.

Just like search engines, people will get bored of stale content. So by keeping fresh content on your homepage, people (as well as search engines) will be interested in visiting your site more often, and possible convert from potential customer, to paying customer.