How to add a favicon to your WordPress site

If you want, you can easily add a favicon to you WordPress site. Either you download a plugin to help you with this or you can simply add this code to your themes functions.php.

function favicon() {
echo '<link rel="shortcut icon" type="image/x-icon" href="'.get_bloginfo( 'stylesheet_directory' ).'/images/favicon.ico">';
add_action('wp_head', 'favicon');

As you can see there is a directory called “images” where I put the favicon image. You can of course change this to make is suit your theme.

One other thing worth mentioning is that I use get_bloginfo( ‘stylesheet_directory’ ) instead of get_bloginfo( ‘template_url’ ) which makes this code also functional for child themes. The reason for not using get_bloginfo( ‘template_url’ ) is that it always returns the parent theme directory.

Posted in Tutorials, WordPress | Tagged , , , | 1 Comment

Add debug mode to WordPress

Most of us that develop things to WordPress have seen it – The white screen of death. But there is no reason to be alarmed, there is actually a really simple way of figuring out what is wrong.

Add this simple code to your wp-config.php.

if (isset($_GET['debug']) && $_GET['debug'] == 'secret')
  define('WP_DEBUG', true);

Next time you you want to see debug message you simply add ?debug=secret at the end of your URL like this.

Of course you should change “secret” to something else…

Posted in Tutorials, WordPress | Tagged , , | Leave a comment

New version of Clean up wp_head

A few days ago I got a request from Matt Cooper about adding an option for removing feeds from WordPress installations. This is, as Matt pointed out in his comment, a very good feature when you use WordPress as a CMS.

Try it out and let me know what you think. Any more features to add?

Posted in Plugins, WordPress | Tagged | 2 Comments

Tell Google AdSense what is relevant on your site

My latest plugin to WordPress was just released to the WordPress plugin repository. With this plugin you can help Google AdSense find out what content on your site that is relevant for targeting ads.

Usually Google is rather good at this but sometimes there are situations where you don’t Google to pay any attention to a text paragraph on your site or blog post.

For instance if you write about that you don’t poker sites it is unfortunately if Google should show ads for poker sites.

You can read more and download Relevant AdSense Ads on the plugin page or on plugin repository.

Posted in Plugins, WordPress | Tagged , , | 2 Comments

Clean up wp_head from unused tags

Recently I saw a lot of people asking how they could remove the lines of HTML code that is shown below from their WordPress installation.

<link rel="EditURI" type="application/rsd+xml" title="RSD" href="" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="" />
<link rel='index' title='Site title' href='' />
<link rel='start' title='Blog post title' href='' />
<link rel='prev' title='Previous blog post title' href='' />
<meta name="generator" content="WordPress 3.0.1" />

With my WordPress plugin called Clean up wp_head there is now easy to remove these line of code by just checking a few boxes. It doesn’t matter if you change theme, they are gone until you uncheck the boxes again.

Read more and download Clean up wp_head on the plugin page or download it from

Posted in Plugins, WordPress | Tagged , , , | Leave a comment

Change your excerpt in WordPress with Easy Excerpt

My first official WordPress plugin is now added to WordPress plugin repository!

After installing WordPress the default excerpt shows 55 words and ends with [...]. With this plugin you can change the length, ending and even add a  “read-more” link after the excerpt without adding any code.

You can read more and download Easy Excerpt on the plugin page or on plugin repository.

Posted in Plugins, WordPress | Tagged , | Leave a comment is finally live!

This site is finally live although there are many things left to do I felt it was best to get started anyway. I already have a Swedish site but I wanted to have a English one because it is better suited when releasing public resources like WordPress plugins.

There is not much content on the site at the moment but in a near future there will be things like WordPress plugins, themes, tutorials, code snippets and other useful things related to WordPress. I will surely write about other things related to web development like PHP, CSS, different frameworks like Zend Framework and Prototype etc.  I am also interested in SEO so there might be a few posts on that topic as well. The list is not exhaustive but it is just a glimpse of what you can expect on this site.

Now, a short introduction about me. I am an entrepreneur, project manager and developer (not necessarily in that order) that have been working in the mobile business for 4 years now. It is a fun business with lots of new things happening all the time. I am not solely into mobile business of course. I also do a lot of web projects, both my own sites but also to clients and friends.

I hope that you will like the site and don’t forget to subscribe to the RSS-feed. If you have any questions feel free to contact me.

Posted in Uncategorized | Leave a comment