How to Display Most Recent Twitter Tweets in WordPress Blog

Since Twitter became popular, many bloggers like to display recent twitter tweets on their website or blog. To display most recent twitter tweets, simply copy and paste the following code to your sidebar.php file.

<?php
// Your twitter username.
$username = "TwitterUsername";
// Prefix - some text you want displayed before your latest tweet.
// (HTML is OK, but be sure to escape quotes with backslashes: for example href=\"link.html\")
$prefix = "";
// Suffix - some text you want display after your latest tweet. (Same rules as the prefix.)
$suffix = "";
$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1";
function parse_feed($feed) {
$stepOne = explode("<content type=\"html\">", $feed);
$stepTwo = explode("</content>", $stepOne[1]);
$tweet = $stepTwo[0];
$tweet = str_replace(”&lt;”, “<”, $tweet);
$tweet = str_replace(”&gt;”, “>”, $tweet);
return $tweet;
}
$twitterFeed = file_get_contents($feed);
echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes($suffix);
?>

Thanks the awesome code from WP Hacks.

How to Highlight Author’s Comments

There are 2 ways to highlight author’s comments, one is use highlight author comments wordpress plugin, another idea is without wordpress plugin. If you don’t want to use wordpress plugin to highlight author’s comment, you can follow the below few simple steps.

First, you need to open styles.css and add the following into this file.

.authorstyle { background-color: #B3FFCC !important; }

Second, open comments.php, find and locate the following code.

<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"></li>

And then replace with

<li class="<?php if ($comment->user_id == 1) $oddcomment = "authorstyle"; echo $oddcomment; ?>"></li>

Please note that you must change 1 to the user id of the author. Thanks to Matt Cutts for this tutorial.

How to Exclude Certain Categories

There are 2 ways to exclude certain categories from your blog, one is use wordpress plugin named Advanced Category Excluder. This plugin was born because there was a no other real alternative to enable content sparationd and some CMS like functionalities in WordPress. The main goal was, to enhance WordPress’s functionalities, to hide some unwanted categories, from defined parts of the blog.

The alternative way is without plugin, you can add the below code inside the loop then it will work.

<?php
if ( have_posts() ) : query_posts($query_string .'&cat=-1,-2'); while ( have_posts() ) : the_post();
?>

4 Things to Do If WordPress Plugins Broken Your WordPress Blog

What will you do if wordpress plugin broken your wordpress blog? I believe that most people have experienced this problem before, and how you overcome your problem? I remember when my wordpress blog was unable displayed properly after installed particular wordpress plugin, so I deleted all the wordpress files, wordpress themes, wordpress plugins, and then I upload all the files again. Anyway, it is work fine finally.

If you can’t display your wordpress blog after installed particular wordpress plugin, you can follow the below steps to solve this problem.

1. De-active the Plugin
Try to de-active the wordpress plugin that you have installed just now.

2. Rename the Plugin via FTP
If it is crash by admin area and caused you can’t de-active the plugins, then you can rename the plugins via FTP.

3. Delete the Plugin via FTP
If simply renaming the plugin was not enough, try to delete it completely.

4. De-activate all the plugins via PHPMyAdmin
Some plugins will alter tables in your WordPress database when you activate them. As a result your blog might keep crashing even after you delete the plugins via FTP.

If that is the case, you will need to log into cPanel, and open the PHPMyAdmin interface. Then select the WordPress database, and browse inside the “wp-options” table. Look for the “active_plugins” column, and edit it. Inside the “options_value” field you will find something like this:

a:31:{i:0;s:13:"AddMySite.php";i:1;s:19:"akismet/akismet.php";
i:2;s:23:"all_in_one_seo_pack.php";i:3;s:16:"authenticate.php";
i:4;s:28:"breadcrumb-navigation-xt.php";i:5;s:18:
"codeautoescape.php";i:6;s:37:

These lines represent the active plugins in your blog. Delete them all and save. This should automatically de-activate every plugin. Now check if your blog is live again, and if the admin area is working. They should be.

/// Source

My Bad Experience of Changing Web Hosting Company

Since it is time to renew my web hosting recently, I have decided to change new web hosting company, unfortunately that I’m not satisfied the requirement of that new web hosting package. The price of this hosting package is attractive and much cheaper than other popular hosting packages, and the price is included unlimited hosting space, unlimited data transfer, host unlimited domains, and etc. Sound great, right?

What I need from a web host is pretty good enough to satisfy me, some more this hosting package is cheap with good features. But, when the time I use FTP to upload and download files, I found that it is slow than my previous hosting packages. Hmmm, whether you realize it or not, cheap thing no good, good thing no cheap. Therefore, I have asked for money back because this hosting company provides anything money back guarantee. After contacted their people, I got back my money, thanks god!

Although my previous hosting package is slightly expensive than this hosting package as mentioned above, but I rather to use back their service because I’m satisfied with their technical support and server uptime all along. The purpose I have changed new hosting company because I was thinking whether I can find other attractive hosting package with competitive price.

I’m using back my previous hosting now! Anyway, if there is any other hosting package that satisfy my requirement in future, I’m willing to give it a try!

WP Cache – Speed Up Your Blog Pages Loading

If you have problem with hosting service or your wordpress blog has taken lots of time for loading, perhaps you can consider to install WP Cache wordpress plugin to generate static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.

My web hosting is quite reliable,so far I don’t think I will need this plugin at this moment. If you need to speed up the loading of your blog and your blog always hit Digg.com’s frontpage, then you are encourage to activate this plugin.

How to Display Random Posts on Your Sidebar

Many readers seldom browse through our old post to read them out, but installing wordpress plugins like Pagenavi and Related Posts can help to give a new life for your old posts. There is another way to make your old posts have a good chance to read by reader, that is to display random posts on your sidebar.

To display random posts on your sidebar, simply copy and paste the following code to your sidebar.php.

<?php
query_posts(array('orderby' => 'rand', 'showposts' => 1));
if (have_posts()) :
while (have_posts()) : the_post();
the_title();
the_excerpt();
endwhile;
endif; ?>
Phone cards for domestic and international use, great rates and excellent connectivity.
International calling card plans offer the ultimate in convenience for phone card users at the lowest cost available.
Australia international phone cards for low-cost international calls from United States to Australia.

Solid Ink
Bedroom furniture
get a debt management plan from debtadvicenow
http://www.margolisfurniture.co.uk/