Read below about related content about wordpress+include+thumbnail+caption+in+excerpt, You can contact us to improve our contents and site quality

Read below about related content about wordpress+include+thumbnail+caption+in+excerpt, You can contact us to improve our contents and site quality

Display Latest Tweets on Your WordPress

December 22nd, 2009 By WP Tricks Posted in Tips

Twitter is phenomenal, almost every internet user have this account, they share everything in Twitter. There are so many method how to display Latest Twitter on your WordPress, we can use display as simple rss, using Twitter Widget or using much advantage method to display twitter. On this Tutorial, I will show you how to display your latest twits with more sophisticated method.

Open your sidebar.php theme (if you want display this tweet on your sidebar) and write this code below

<div class="latest-twit">
<?php
$feedURL = "http://twitter.com/statuses/user_timeline/68559295.rss" // change to your feed URL
$doc = new DOMDocument();
$doc->load($feedURL);
$arrFeeds = array();
foreach ($doc->getElementsByTagName('item') as $node) {
    $itemRSS = array (
        'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
        );
    array_push($arrFeeds, $itemRSS);
}
$limit = 5;
for($x=0;$x<$limit;$x++) {
    $title = str_replace('bavotasan: ', '', $arrFeeds[$x]['title']);
    $str = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $title);
    $pattern = '/[#|@][^\s]*/';
    preg_match_all($pattern, $str, $matches);

    foreach($matches[0] as $keyword) {
        $keyword = str_replace(")","",$keyword);
        $link = str_replace("#","%23",$keyword);
        $link = str_replace("@","",$keyword);
        if(strstr($keyword,"@")) {
            $search = "<a href=\"http://twitter.com/$link\">$keyword</a>";
        } else {
            $link = urlencode($link);
            $search = "<a href=\"http://twitter.com/#search?q=$link\" class=\"grey\">$keyword</a>";
        }
        $str = str_replace($keyword, $search, $str);
    }
    echo '<li>'.$str.'</li>';
}
?>
</div>

That’s all and you can made some custom on this design by play around with your css skills. Thanks for Batovasan for share this code. If you have better idea how to display latest tweets in WordPress please let’s me know

Amazing Touch

It’s All About Post Thumbnail

December 22nd, 2009 By WP Tricks Posted in Tips

WordPress 2.9 built in new features, like Online Image editor and Post Thumbnail, On this post I will give some information about post that coverage Post Thumbnail, So, if you need to know about Post Thumbnail and add your theme support this featured you should Read on this post

Happy Explore new featured in WordPress 2.9 and have nice holiday ;) I also written some tutorial how to fix TimThumb readfile problem

Amazing Touch

Added Permalinks Shortcode on WordPress

February 20th, 2010 By WP Tricks Posted in Tips

WordPress is: Themes, Plugins, Widget, Shortcode, PHP and GPL Licensed. Did you know that, beside Widgets, Another useful WordPress API is shortcode, and now I will show you how to added permalinks shortcode into our WordPress site. Why this shortcode is useful? because with permalinks shortcode The generated URL will be updated automatically, when original permalinks on page or post change.

How To Added Permalinks Shortcode

How To Added Permalinks Shortcode

Let’s get started, write down permalinks shortcode functions on your functions.php in your current theme

function do_permalink($atts) {
	extract(shortcode_atts(array(
		'id' => 1,
		'text' => ""  // default value if none supplied
    ), $atts));

    if ($text) {
        $url = get_permalink($id);
        return "<a href='$url'>$text</a>";
    } else {
	   return get_permalink($id);
	}
}
add_shortcode('permalink', 'do_permalink');

Read the rest of this entry »

Amazing Touch

How To Display Twitter counter in Text

February 11th, 2010 By WP Tricks Posted in Tips

Display Twitter Counter in Text is easily in WordPress with PHP code, all need to do just write down some PHP Script in our wordpress theme, we can write it on sidebar.php, footer.php, header.php or whatever we want to put on.

This code is similar with our previous tutorial about display FeedBurner counter in text, but we need to change some code, because the source is different, we still use file_get_contents() functions, this functions is the some function that we use to modified TimThumb Script to make it work on some server problem. So, let’s get started
Read the rest of this entry »

Amazing Touch