Kill IE6 on your WordPress blog
October 24, 2008
Who doesn’t hate IE6? This obsolete browser is a pain for any web developer or designer. If you really hate Internet Explorer 6, read this recipe and you’ll know how to make it crash if someone who uses it tries to read your blog. Get ready to say goodbye to IE6. Open your header.php file and paste the following code anywhere within the <head> and </head> tags: <!--[if lte IE 6]> <STYLE>@;/* <![endif]–> Any courageous IE6 user who’ll try to read your blog will get an instantaneous... [Read the full story]
Get rid of the comment section on your WordPress blog
October 24, 2008
Altought it can be weird in some points because comments are an important part of a blog, I have read many user asking how they can get rid of the “comments” section on their WordPress theme. That’s very easy to do. Removing the comments section on a blog can sound weird at first, but sometimes you just want to spread some news without getting any feedback. In case you don’t want any post to be commented, just edit your single.php file from your theme. Find the following line: <?php comments_template(); ?> and... [Read the full story]
Display how many post have been published today
October 24, 2008
For this recipe, we’ll have to do two things. The first one is How to Display today’s posts and the second is How to Display the total number of posts on your WordPress blog. The first thing to do is to get today’s date, and then create another variable containing today’s date - 24 hours. Then, we just have to send a SQL request to the database by using the $wpdb->get_var() method. <?php $today = date("Y-m-d H:i:s"); //Today's date $daysago = date("Y-m-d H:i:s",strtotime(date('Y-m-j H:i:s')) - (1 * 24 * 60... [Read the full story]
Use multiple custom headers on a WordPress theme
October 24, 2008
Do you ever wanted to have multiple headers on your WordPress blog? If yes, here’s a clear and concise tutorial that will help you to get themost out of your blog headers! The first thing to do is to create header files. Create as many different headers as you want. In this exemple, I have created 3 custom headers from my theme default file header.php, names headercontact.php, headergallery.php and headerdefault.php. By using the php include() function and WordPress conditional tags, we can define custom headers easily. Replace... [Read the full story]
How to remove ads for registered users
October 22, 2008
Hiding ads for registered users is a good idea since it can help you to decrease the risk of being smart-priced by Adsense. To achieve this, we just have to use the is_user_logged_in() function, which returns true is an user is logged in. This recipe is very easy to use, just paste the following code anywhere on your theme. if (!is_user_logged_in()) { // Insert Adsense (or whatever) code here } Read More →




















