Author Archive

How to get Twitter Follower Count in WordPress?

February 7, 2010 |  by Design Gala  |  No Comments

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 Design Gala  |  3 Comments

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 Design Gala  |  No Comments

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 Design Gala  |  No Comments

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 Design Gala  |  No Comments

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 Design Gala  |  No Comments

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');

;)

Create a live time clock in your webpage

November 24, 2009 |  by Design Gala  |  No Comments

Sometime we need to put a live time clock in webpage. There are various codes and scripts which allows us to insert live time and date in the page . I was reading an article and found quite easier than the ones i have used in my projects. So i feel that i should share with others.

We need to follows some simple steps for this as mentioned below

Step 1:
Insert the following codes into the webpage where, we wish to appear live time clock.

<script language="javascript" src="liveclock.js">
 
/*
Live Clock Script-
By Mark Plachetta (astro@bigpond.net.au©) based on code from DynamicDrive.com
For full source code, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/
 
</script>

Step 2:
Insert the following codes inside the body of the html page

<body onLoad="show_clock()">
</body>

Step 3:

Download liveclock.js (by right clicking, and selecting “Save As”), and upload to your webpage directory.

Click here to view the DEMO

How to Exclude Categories from RSS Feed in WordPress

November 14, 2009 |  by Design Gala  |  1 Comment

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 Design Gala  |  1 Comment

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 Design Gala  |  13 Comments

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