Some very useful wordpress hacks

Today i organize some very useful WordPress hacks.Hope this may help you in your future projects Display number of Facebook fans in full text If you want to display the number of your Facebook Fans then use this code. Replace “YOUR PAGE-ID” with your own Page-ID. Code: [php]$page_id = "YOUR PAGE-ID"; $xml = @simplexml_load_file("http://api.facebook.com/restserver.php?method=facebook.fql.query&query=SELECT%20fan_count%20FROM%20page%20WHERE%20page_id=".$page_id."") or […]
Add favicon icon dynamically in your wordpress theme

You can easily add favicon icon dynamically in your WordPress theme.This may be very useful for child theme where you don’t want to edit the parent theme header.php.Paste this code in your theme function.php to load the favicon dynamically and also don’t forget to change the favicon icon url. Hope this piece of code may […]
How to add facebook likebox in wordpress post or page using shortcode

If you want to show your facebook fanpage likebox in wordpress post or page then copy and past the code below in your theme function.php [php] //ADD FACEBOOK LIKE BOX SHORTCODE function fb_likebox($atts) { extract(shortcode_atts(array( "fb_link" => ‘https://www.facebook.com/techsloution4u’ ), $atts)); return ‘<h2 class="join-fb">Like Them On Facebook</h2> <fb:like-box href="’.$fb_link.’" width="595" height="100" show_faces="false" stream="false" header="false"></fb:like-box>’; } add_shortcode(‘fb_box’, […]
Add logo to wordpress dashboard login without plugin

If you want to change the WordPress dashboard login logo then this piece of code can meet your requirement. Just paste this code in the your theme functions.php [php] function custom_login_logo() { echo ‘<style type="text/css"> h1 a { background-image:url(‘.get_bloginfo(‘template_directory’).’/images/custom-login-logo.png) !important; } </style>’; } add_action(‘login_head’, ‘custom_login_logo’); [/php]
Some useful wordpress functions

Here is a list of some useful WordPress functions.This may reduce your development time. wp_mail() Some time we need to send email to the user.We can use this wordpress function wp_mail() to send email.It works just like the php email function but have better functionality. wp_loginout() Displays a login link, or if a user is […]
Enable excerpts in wordpress page

WordPress in default does not have the excerpt feature on Page.But you can enable this by entering a few lines of code in Theme functions.php of your template.If your theme doesn’t have function.php then please create one. [highlight]NOTE: Please take a backup of your theme before doing this theme hack.[/highlight] Here is the code : […]
WordPress Blank HTML5 theme

HTML5 comes with a lots of feature! Soon we need to use them in WordPress projects. I discontinue my project but here is another great html5 project you can check https://github.com/html5blank/html5blank
Add floating social icons to Thesis WordPress

In this tutorial i will show you how to add floating social icons to Thesis WordPress .Copy and paste this code for the floating social icons into your Custom Functions. Note: Always take a backup before any type of modification. [php] // Make the URL to share if( is_singular() ) { $url = get_permalink(); $text […]
Using Loops and Pagination in WordPress

Using loops you can show wordpress content.If you want to show the full content for the first two posts and then just the excerpt for the rest then this code is for you. [php] <?php $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts("paged=$page&posts_per_page=5"); ?> <?php $count = 1; // Sets count to 1 on first […]
WP Turbo Autoblogging Premium WordPress Plugin

WPTurbo is a new premium plugin for WordPress that allows you to create powerful nice sites which create content, update themselves automatically and earn you income each month by various affiliate programs.