Display Latest Twitter Status On Your Blog

Here’s a short little script that will display the latest Twitter status on your blog. I pulled the code from CSS-Tricks and modified it a bit. This little piece of code will pull-up the user’s latest Twitter status, time and source. You can also pull up the user’s name, screen name, location, url, followers, friends, favorites and more.

Here’s the snippet of code:

function getTwitterStatus($userid) {
  $url = “http://twitter.com/statuses/user_timeline/$userid.xml?count=1?;
  $xml = simplexml_load_file($url) or die(“could not connect”);
  foreach($xml->status as $status){
    echo $status->text;
    echo $status->created_at;
    echo $status->source;
    echo $status->user->name;
    echo date(“F j, Y, g:i a”,strtotime($status->user->created_at));
    echo $status->user->statuses_count;
    echo $status->user->followers_count;
    echo $status->user->friends_count;
    echo $status->user->favourites_count;
    echo $status->user->location;
    echo $status->user->time_zone;
    echo $status->user->url;

You can format the output anyway you want it. For readability purposes, I formatted the $status->user->created_at field with the date function. All the other variables are pretty much self-explanatory.

Add the function in ‘functions.php,’ then insert this code anywhere in your WordPress template.


Short URLs Lead To Dead Ends

What happens when you click on a failed short URL? You can’t go anywhere. You are stuck on an island. You can’t browse the main index page since the domain you are given is the domain of the URL shortener service. One way of finding the true URL is to check if the URL short service has a lookup function.

If it doesn’t, you’re pretty much dead on the water. That’s dilemma for short URLs. It works great when it does, but if it doesn’t, it’s useless. One more thing, clicking on a shortened URL sometimes requires a leap of faith since you don’t know what page you’ll be landing. This is especially troublesome for pages that contain malware and viruses.

If you are giving out short URLs, it always good practice to check if the short URL works. If you don’t trust other services, you can always start your own.

Create A WordPress Page With An External Link

I stumbled on a really neat trick of creating a WordPress Page that points to an external link. Big deal! Well, it’s a big deal because I didn’t think it was going to work at all, but apparently it does. Here are some background information about WordPress Pages. A WordPress Page is a basically blog post that resides outside of the chronological order of posts. Examples of WordPress Pages are the About, Archives and Contact Pages. These Pages are usually displayed on the sidebars of countless WordPress themes. They also appear at the header of some WordPress themes as the main navigation bar.

What if you want to create a link that will point to an external link.

Here’s the trick. Create a blank WordPress Page by accessing the Dashboard > Pages > Add New. Place in the title bar the following format.

<a href=”your-external-link-here”>Your Title</a>

It’s an odd looking title to have the HTML codes included in them. Normally, HTML codes in the title bar are suppressed or are removed, but apparently it works with the current WordPress release. That’s all you have to do. Even if you add text to the Page, you will not see the Page at all because it redirects to an external link. Sort of like a hijacked page. It’s a neat trick. Works great. I use it with my Twitter Page link. See the sidebar.

You can do the same if you want to point to an internal link in the same domain. Just edit the Page’s permalink to point to your internal link.

Google Font API

I had a little fun this morning playing around with Google Font API. With just a couple of quick codes on your webpage, blog or website, you can really style your sites using over a dozen beautiful fonts available from the Google Font Directory. The usage is pretty straightforward. See sample below. Just add a stylesheet reference in your header. Add some CSS elements in your stylesheets. Tada. Your done. Your website is now using Google’s web fonts. The advantage is you get a choice of high quality open source fonts, it works in most browsers, and it’s extremely easy to use.


<link rel=”stylesheet” type=”text/css” href=”http://fonts.googleapis.com/css?family=Tangerine”>


body { font-family: ‘Tangerine’, serif; }

If you want a little bit more control, flexibility and speed, you can use Font Loader. It’s a little bit more involved. It requires the use of Javascipt. You can also take advantage of TypeKit.

Create A Website Based On One Color

Are you thinking of creating a website based on one color? One cool tool you can use is a Color Palette. This particular tool will create for you 10 shades of the base color with varying degrees of opacity. The top row emulates opacity over a white background, while the bottom emulates opacity over black background.

The opacity values are 100% opaque, 75%, 50%, 25% and 10% on the top row. The bottom row begins at 85% rather than 100% and continues on as the first. To make it more interesting, you can use different colors other than a white and black backgrounds. I use the color #365215 for this blog. Here is the varying shades of colors using this tool.

Create Your Own WordPress Breadcrumbs

Breadcrumbs in web terms are a chain of links that leads the user back to the main index page. This article will teach you how to manually create your own breadcrumbs within WordPress. You will place these codes in your WordPress themes just underneath your header, for example.

Create a Home

Let’s get started. Let’s create a home. Use this HTML and PHP code.

<a href=”<?php bloginfo(‘url’);?>”>Home</a>

Double Angle Quotation Marks

Let’s use a Guillemet or a Double Angle Quotation Mark to separate the links.

The symbol » equals to “&raquo;” in HTML.

Post and Page Titles

Let’s display the titles. The code for both post and page titles are the same.

<a href=”<?php echo get_permalink() ?>”><?php the_title(); ?></a>

All Together Now

<a href=”<?php bloginfo(‘url’);?>”>Home</a> &raquo; <a href=”<?php echo get_permalink() ?>”><?php the_title(); ?></a>

The Result

Home » Create Your Own WordPress Breadcrumbs

Just place this piece of code in your WordPress theme files: e.g. pages.php and single.php. For the main index.php page, you just need the Home link.

That’s it. Fairly easy.

You can get really elaborate by adding Categories, Months and Dates in your breadcrumb. Nevertheless, this article will get you started in the right direction.

ZDNet Website Redesign

One of my favorite websites for browsing the latest tech news is ZDNet. This morning, I noticed a new website redesign. It’s cleaner, cooler, compact and ad-friendly I might add. I’m digging it. I love the homepage slider feature, although I think it’s too fast. The footer section is much, much bigger.

In terms of color, the blue colors seems to be much darker than the previous design, although I don’t have the old site up for a side-by-side comparison. The website reminds of the kit of the US Mens National Team for this summer’s World Cup in South Africa. The US National unis have also gone dark the last couple of years.

I think the biggest improvement of the website redesign is the comments section. I use to dread reading comments because I had to click on each one of them to read them. That’s no longer the case. It’s structured similar to how most blog comments are displayed these days, in chronological order.

As in any new website redesign, I found a couple of kinks. There are several broken links, but I’m sure they will fix that soon. It will take a while for me to learn the new site. Navigating is a bit awkward at first, but improving the comments structure is by far the best thing that’s happened to this site.

Web Hosting Initiative Guidelines

Selecting the right web hosting company is the first step to ensuring a successful online presence. There are several approaches in choosing a cheap web hosting solution for websites. Let’s suppose you registered a domain name and you need a quality cheap website hosting account from a reputable Canadian web hosting company.

The two common methods are: to directly contact the web hosting companies and purchase a desired plan without putting any effort in researching the available packages. The other method is to perform a thorough research from review websites.

In most cases, every hosting provider tries to increase sales with less emphasis on quality of service. Website hosting companies usually hide the negative aspects in their products and promote a single piece of information with less on facts.

The best approach is to perform due diligence by researching web hosts from review websites. There are numerous hosting review sites that provide consumers with the latest and up to date reviews of cheap web hosts as well as dedicated server providers.

Webmasters are getting much more involved. They write reviews about each package or each company whether they are promoting cheap website hosting or dedicated servers.

A decision can be made by comparing the different packages of different hosts on the basis of bandwidth, storage space, and other additional features. Depending on the criteria, whether price and features, a web hosting provider can be given preference over one another.

In a nutshell, the best way to go for a web host is to visit a hosting review site that will give you a true picture of reality and will afford you the most suitable web hosting plan for your website.

Get A Reliable Hosting For Free

If you wanted to have your own blog or website, looking for a web hosting provider is important. They provide you that web space that you need in order to get your site up online. Although, there are many web hosting providers these days that offer free hosting, unfortunately, not all of them could provide a reliable service not even for a simple blog.

If you’re not careful enough on choosing the right web hosting provider for your site, then you can go through a lot of annoying issues such as downtimes, loosing your files, hidden charges and other things that I’m sure you wouldn’t want to encounter. That’s the reason why web hosting providers play an important role with keeping your website up and running and as well as keeping you happy.

Doteasy is one of the best web hosting providers that also provide free web hosting. But, unlike with other web hosts, Doteasy makes things less complicated and better experience for users. With their free web hosting plan, you already get free site builder such as for creating blogs, forums, photo gallery and more. Their free web tools are easy to use even for people who don’t have much technical knowledge in creating a site.

With their current promo of any .COM/.NET/.ORG domain registration for $7.95 with coupon code 1003BPM, you can start blogging and create your own online photo gallery with their free web hosting services and all the free tools. Besides, they do provide email and chat support for all their customers, in case you need some assistance. And they also guarantee 99.9% uptime for your site and no annoying ads like what other free web hosts provide. With them, you can easily set up a professional looking website completely for free.

And aside from their great hosting offers, what’s even better is their affiliate program where you can earn from $5 up to $70 just for a single referral sign up. You don’t even need to be a paying customer to start earning like what other web hosts require. They’ll also provide you with all you need such as links, banners and buttons. So, if you’re looking for reliable hosting for free and a way to earn money online, then you might want to check what Doteasy has to offer.