Author Archive

How to get Twitter Follower Count in WordPress?

February 7, 2010 |  by Anish Blon  |  No Comments
ebeceff492d8b49adac3555c40940c07 Del.icio.us

I am neither the first nor the last one that will be writing about placing twitter follower counter in webpage. Though there already exist many widgets anyone can easily use and customize; see here and here; But those widgets have limited options in terms of color, layout and moreover they have their info attched (somewhere) in widget which does not feels good. Here’s my attempt on how to get follower count in twitter using PHP.

Read More

7 Best WordPress Plugins I Frequently use

7 Best WordPress Plugins I Frequently use

February 4, 2010 |  by Anish Blon  |  3 Comments
61529e9b844625f2eccbc78d7a1ac867 Del.icio.us

Easy availability of thousands of Plugins and support are one of the reason behind success of WordPress. In case if you find trouble with then don’t panic because there are hundred thousands of developers for your support via forums, blog posts. But wait, there are thousands of plugins in WordPress Plugin directory; Do you need them all? Simple answer is NO. The selection of plugin depends on the requirement of the project. For e.g; I use WP125 plugin for ads et cetera.

I am making a list of plugins that I use frequently in my most of the projects and recommend buyers to use.

Read More

StudioPress Launches The Genesis Theme Framework

StudioPress Launches The Genesis Theme Framework

February 3, 2010 |  by Anish Blon  |  No Comments
368e47e701e4c7c4cf93f8c5912601dd Del.icio.us

After two months long work, StudioPress finally come up with a bang with new Genesis Theme Framework. Along with it, they have released two child themes Executive and Mocha to add up design flavor and extensibility to core theme. Overall, it looks great addition to theme list. As per them, new framework is created keeping BuddyPress extensibility in mind. I won’t be surprised if they offer BuddyPress theme using this framework.

Read More

Portal Premium WordPress Theme - ThemeJunkie

Portal Premium WordPress Theme – ThemeJunkie

February 2, 2010 |  by Anish Blon  |  No Comments
dba59fe1b0a957809581220344d43ba8 Del.icio.us

Theme Junkie released clean news premium WordPress theme. The theme named ‘Portal‘ includes features like auto thumbnail generation, featured content slider, built in advertising, theme option panel and more.

Price:

  • Standard Package: $19.95
  • All Theme Package: $49.95

Read More

Simple Trick to Hide Tags, Comments widgets from WP-admin Add/Edit Post

Simple Trick to Hide Tags, Comments widgets from WP-admin Add/Edit Post

January 31, 2010 |  by Anish Blon  |  No Comments
32300e733c27138cf06a507f0c19f1af Del.icio.us

I wasn’t surprised when one of my buyer asked me if there’s a way to hide features like tags, comments widgets. Its not uncommon in a simple CMS based projects where tags and comments widgets are seldom needed. Hence, I came up with a simple trick to hide those widgets.

Basically I used help of CSS ‘display:none’ to achieve it. I created a function ‘hide_wp_tags_from_admin’ and then I added this filter to to admin head using add_action. You must either create a plugin and add it to plugins folder or you can use a quick dirty hack by adding below function to function.php of your active theme.

function hide_wp_tags_from_admin() {
    echo '<!--
#commentsdiv, #tagsdiv-post_tag { display:none; }
-->';
}
add_action('admin_head', 'hide_wp_tags_from_admin');

Very simple; isn’t it? Have your say.

Darn you WordPress AutoP Filter – How to disable AutoP?

November 25, 2009 |  by Anish Blon  |  No Comments
d54b948645d28a5521ad9d217d18f6ff Del.icio.us

WordPress automatically adds <p> tag for each line breaks within a post or page. For some, this filter can be a headache for their particular project.

I quickly googled and fixed it by adding following code in function.php

remove_filter('the_content', 'wpautop');

;)

How to Exclude Categories from RSS Feed in WordPress

November 14, 2009 |  by Anish Blon  |  No Comments
1341e51085851d7968f2fb59e4287777 Del.icio.us

wplogo-stacked-rgbLast week I wrote about how to disable WordPress RSS feed completely from end users. Sometimes there are cases where we want posts from certain categories not to publish in RSS feed; we just wish to unpublish post in feed.

There are 2 ways to disable categories in feeds.

1. If you’re a feedburner user

You’ll have to edit the original feed source in your feedburner account like below;

http://designgala.com/feed?cat=-7&cat=-18

Above URL would exclude posts from categories with ID 7 and 18

2. From standard RSS feed

In order to use this method, you need to add following code in function.php of your active theme.

/**
* disable RSS feed
*/
function exclude_categories_in_feed($query) {
	if ($query->is_feed) {
        $query->set('cat','-7,-18'); 
return $query;
}
 
add_filter('pre_get_posts','exclude_categories_in_feed');

I hope this was short but cool wordpress hack to exclude categories from RSS feed.

An easy Hack to Disable RSS feeds in WordPress

November 7, 2009 |  by Anish Blon  |  No Comments
67529bc2b7f24298ada4c75c6053cb92 Del.icio.us

disable rss wordpressRSS feed is one of the best feature of WordPress for sharing post. But there are cases where feeds either have little importantce or does not have any roles to play as in static websites, CMS. For all who do not need RSS feature in WordPress it can be disabled with a little effort.

Step 1:

Create a new function in function.php located in your active theme folder like below:

/**
* disable RSS feed
*/
function wp_disable_feed() {
   wp_die( __('Sorry, no feeds available, return to <a href="'. get_bloginfo('url') .'">homepage</a>') );
}
 
add_action('do_feed', 'wp_disable_feed', 1);
add_action('do_feed_rdf', 'wp_disable_feed', 1);
add_action('do_feed_rss', 'wp_disable_feed', 1);
add_action('do_feed_rss2', 'wp_disable_feed', 1);
add_action('do_feed_atom', 'wp_disable_feed', 1);

I told you. Its very easy to disable feeds.

How to expand collapse (toggle) div layer using jQuery

November 5, 2009 |  by Anish Blon  |  3 Comments
5553c758e2081e2da8ff8d4169f0fd39 Del.icio.us

Quite often; in most of my projects, I have been using jQuery to toggle the layer. So, I thought of sharing how easy it is to expand div layer and collapse panel using jQuery. When user clicks on the header, the content gets displayed by sliding down and when you again click on the header, the content collapses.

Read More

5 Cool Video plugins for WordPress

October 20, 2009 |  by Anish Blon  |  No Comments
c30afe7d95d36548bd9f4b8e8b8ec513 Del.icio.us

I was just checking in for WordPress plugin for embedding video for one of my client. And I came with the following cool plugin list. All of these plugin allows to embed videos from sites like YouTube, Google Video, Vimeo, Metacafe and many others; in very easy way.

1. Viper’s Video Quicktags

vipers_videoThis plugin adds on new buttons to the rich text editor on WordPress. In order to embed a video, you just need to paste the video URL into the prompt box. With this plugin you can also fully configure the width, height, colors and alignment on the page.

Download: http://wordpress.org/extend/plugins/vipers-video-quicktags/

2. FLV Embed

flv_embedThis plugin supports video sitemap generation, includes options such as auto start and menu control bar. It also supports text only output for RSS that prompt readers to visit the original post for Flash content.

Download: http://wordpress.org/extend/plugins/flv-embed/

3. Interactive Video Plugin

interactive video Apart from video embed this plugin also includes the ability to upload/ record/import videos directly to your post, edit and remix content with an online video editor. You can even enable video responses, manage and track your video content.

Includes custom sizing of the video player, advanced sharing options and allow readers and subscribers to add video and audio comments.

Download: http://wordpress.org/extend/plugins/kaltura-interactive-video/

4. Flash Video Player

flash_video_player This plugin allows the addition of videos into WordPress by using a menu with post-level overrides for customization of size, background color etc. Give up your style wishes once, and you never ever have to manually style a video again.

Download: http://wordpress.org/extend/plugins/flash-video-player/

5. Video Embedder

video embedderTo embed a video using this plugin, all you need is the ID of the video. With this plugin you can manage the settings for all of your embedded movies from the WordPress settings for Video Embedder, the properties for all the movies will be updated instantly as soon as you save the settings.

Download: http://wordpress.org/extend/plugins/video-embedder/

Missed Any? Let us know.

Top Favorite WordPress SQL Hacks

October 12, 2009 |  by Anish Blon  |  1 Comment
315d1b3ffa02958015eda16c66ab02a2 Del.icio.us

Whenever I work with WordPress and needed SQL hacks, have found this article very helpful. True said that there are cases when it becomes inevitable to run SQL queries directly to get things done despite of availability of many plugins.

Here are collection of my favorite WordPress SQL hacks.

1. Batch Delete Post Revisions:

Post revisions are very useful but they also increase the size of your MySQL database. You can manually delete revisions, but that’s very long and boring work.

SQL:

DELETE FROM wp_posts WHERE post_type = "revision";

2. Erase all Spam Comments:

Even though I have differnt plugins like AKismet, reCaptcha; I’ve always had very hard times dealing with spam. This solution made me very happy when I first used.

SQL:

DELETE FROM wp_comments WHERE comment_approved = '0';

3. Manually Reset Your admin Password:

SQL:

UPDATE `wp_users` SET `user_pass` = MD5('mypassword') WHERE `wp_users`.`user_login` =`admin` LIMIT 1;

4. Change Your WordPress Address:

I often use this hack very often. There are many cases when project development is done in demo site address. When we need to make it live; there’s already lots of data (testing + live) and its necessary to run following SQL to get things going.

4.a. changes WordPress URL:

UPDATE wp_options SET option_value = REPLACE(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';

4.b. Replace the relative URL (guid) of each post:

UPDATE wp_posts SET guid = REPLACE(guid, 'http://www.oldsite.com','http://www.newsite.com');

4.c. Search and replace in the wp_posts table to make sure that no absolute URL is still here:

UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.oldsite.com', 'http://www.newsite.com');

We’re done changing WordPress Address. I am sure you do have your own collection of fav SQL hacks.