WordPress tip: Automatically empty Trash

Simply open your wp-config.php file (located at the root of your WOrdPress install) and paste the following code:

define('EMPTY_TRASH_DAYS', 10 );

The second parameter is when to empty trash, in days.

Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!

WordPress tip: Automatically empty Trash

Thematic WordPress Theme Toolbox: 10 extremely useful hooks

If you’re looking for a tutorial on how to create a Thematic child theme, you should read this post.

Add a favicon

A favicon is a small image displayed by modern web browsers. It is a must have for all websites, because it allows your visitors to quickly visualize your site among others when they have lots of browser tabs open at the same time.
This handy code will add your favicon to your theme. Make sure a favicon.png file is in your child theme images directory, and then paste the code in your functions.php file:

function childtheme_favicon() { ?>
	<link rel="shortcut icon" href="<?php echo bloginfo('stylesheet_directory') ?>/images/favicon.png" />
<?php }
add_action('wp_head', 'childtheme_favicon');

Source:

Add an Internet Explorer specific stylesheet

Who doesn’t hate Internet Explorer? Unfortunately, most clients will require developers to make their site IE-compliant. And the best way to do so is to use some conditional comments and a dedicated stylesheet.
Create a file named ie.css in your child theme directory, and then insert the following code in your functions.php file:

function childtheme_ie_style() { ?>
	<!--[if IE]>
		<link rel="stylesheet" type="text/css" href="http://www.webdevcat.com/wp-content/themes/webdevcat/ie.css" />
	<![endif]-->
<?php }
add_action('wp_head', 'childtheme_ie_style');

Modify Doctype

By default, Thematic outputs a XHTML 1.0 transitional doctype. If for some reason, you prefer using another kind of doctype, pasting the code below in your functions.php will do the trick.

function childtheme_create_doctype($content) {
 $content = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
 $content .= "\n";
 $content .= '<html xmlns="http://www.w3.org/1999/xhtml"';
 return $content;
}
add_filter('thematic_create_doctype', 'childtheme_create_doctype');

Use Feedburner RSS feeds

Feedburner is very popular among bloggers. If you want to replace default rss feeds by feedburner feeds in Thematic, this code is for you.

function childtheme_rssfeeds($content) {
	$content = "\t";
	$content .= "<link rel=\"alternate\" type=\"application/rss+xml\" href=\"";
	$content .= "http://feeds2.feedburner.com/Catswhocode";
	$content .= "\" title=\"";
	$content .= wp_specialchars(get_bloginfo('name'), 1);
	$content .= " " . __('RSS feed', 'thematic');
	$content .= "\" />";
	$content .= "\n";
	return $content;
}
add_filter('thematic_rss', 'childtheme_rssfeeds');

Add Google Analytics code to your Thematic child theme

Google Analytics is another free and very useful service. In order to allow GA to collect your visitor information and create your stats, you have to insert a small piece of Javascript on your footer.php file.
Insert this code in your functions.php file, save it, and you’re done. Of course, don’t forget to replace the Google Analytics code with your own!

function ga(){ ?>
	<script type="text/javascript">
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">
	try {
	var pageTracker = _gat._getTracker("UA-XXXXX-10");
	pageTracker._trackPageview();
	} catch(err) {}</script>
<?php }
add_action('wp_footer', 'ga');

Modify Thematic footer credit

If you’re building a Thematic child theme for a client, you may want to insert your credit link in the footer text. The following code will do it. Don’t forget to give credit to Ian Stewart for his awesome work on the Thematic theme framework!

function my_footer($thm_footertext) {
	$thm_footertext = 'Copyright &copy; 2010 Jean-Baptiste Jung. <a href="http://www.webdevcat.com">WebDevCat.com</a> is obviously powered by <a href="http://www.wordpress.org">WordPress</a> &amp; the <a href="http://www.themeshaper.com/thematic">Thematic Theme framework</a>.';
	return $thm_footertext;
}
add_filter('thematic_footertext', 'my_footer');

Display Thematic menu above header

Want to have your navigation menu above your site header? That’s not a problem. This code will remove the menu from below the header and then put it above it.

function remove_thematic_actions() {
    remove_action('thematic_header','thematic_access',9);
    add_action('thematic_aboveheader','search_access',9);
}
add_action('wp','remove_thematic_actions');

Change “more” link text

Thematic “Read More” link displays Read More » by default. The following code allow you to change the “Read More” text.

function childtheme_more_text($content) {
	$content = 'Click to read the rest!';
	return $content;
}
add_filter('more_text', 'childtheme_more_text');

Change gravatar size in Thematic comments

By default, Thematic displays 35px*35px gravatars. If you want to change this size, no problem: Just paste this code in, as usual, your beloved functions.php file.

function childtheme_avatarsize() {
    return '56';
}
add_action( 'avatar_size', 'childtheme_avatarsize' );

Source: http://themeshaper.com/forums/topic/on-using-avatars-in-thematic

Remove Thematic menu on specific page template

If you want to make a squeeze page on your site or blog using Thematic, that’s quite easy: You only have to create a page template and remove the menu. To do so, just paste the code below in your functions.php file.
Don’t forget to set your page template name on line 2.

function remove_access() {
    if (is_page_template('affiliate.php')) {
        remove_action('thematic_header','thematic_access',9);
    }

add_action('wp_head','remove_access');
}

Source: http://themeshaper.com/forums/topic/conditionally-removing-thematic_access

By the way, if you’re interested in Thematic Theme help, don’t hesitate to ask me. I just started freelancing and I’m ready to help you for a reasonable price.

Like CatsWhoCode? If yes, don’t hesitate to check my other blog CatsWhoBlog: It’s all about blogging!

Thematic WordPress Theme Toolbox: 10 extremely useful hooks

Need 300 New Leads To My Health Product by MattCruz

Description I need 300 people who will sign up to order free trial products from this weight loss product I’m promoting. Leads must be new, fresh and unique. I will provide you the link to the website after you won the bid… (Budget: $1500-3000, Jobs: Advertising, Data Entry, Facebook, Internet Marketing, Sales)

Design and Develop Website Application by Hibernicatio

Simple effective comparison and ratings website required for an affiliate. Please see file. It really is as simple as this. Nice clean website that works. Some detail has been removed but will send full detail after expressions of interest… (Budget: $250-750, Jobs: CMS, Ruby & Ruby on Rails, SEO, Website Design)

Translation of Terms and Conditions from German into English by ChrisUrban

Hi, first of all thanks for taking an interest in my posting. I m seeking an experienced translator (native speakers strongly preferred) to translate a text document (MS format), containing the Terms & Conditions of an IT company from German into English… (Budget: $30-250, Jobs: Article Rewriting, Articles, Copywriting, Translation)

Website Design Required (Only PSD). HTML will be done by us by indifas

BID ONLY IF YOU CAN THINK OUT OF THE BOX & HAVE A GREAT PORTFOLIO We need an extra ordinary design. Dont copy from any website or use templates. We are a design house & can do it ourselves. We are here to get an original design… (Budget: $30-250, Jobs: Graphic Design, Photoshop, PSD to HTML, Templates, Website Design)

Life term for mother-to-be killer

Alan McMullan

A man who stabbed a heavily pregnant woman in a random street attack has been jailed for life.

Alan McMullan attacked Claire Wilson, 21, as she walked to work in a Grimsby pizza restaurant last June.

Hull Crown Court heard McMullan, 54, claimed voices had told him to harm people and he had previously received treatment from mental health services.

McMullan, of Sherwood Road, Grimsby, was told he would serve at least 20 years in jail for Miss Wilson’s murder.

McMullan admitted manslaughter on the grounds of diminished responsibility when he appeared at Hull Crown Court last September.

However, his plea was not accepted by the Crown Prosecution Service.

The jury of six men and six women returned a verdict of guilty on the murder charge on Wednesday after deliberating for an hour and 30 minutes.

The seven-day trial heard how Miss Wilson, who was six months pregnant, and her unborn baby died in hospital after McMullan forcefully stabbed her in the back in Pasture Street before walking "casually" away.

He told police officers who arrested him: "I’ve got voices in my head telling me to do it. I left the knife stuck in her."

This article is from the BBC News website. © British Broadcasting Corporation, The BBC is not responsible for the content of external internet sites.