Post Pic

How to automatically add a class to body_class if there’s a sidebar

No comments yet

By default, the body_class() function adds some class to the <body> tag to allow you to style your site more easily. But unfortunely, no extra class is added when your template has a sidebar. Here is a imple function to solve this problem.

Post Pic

WP Theme Generator giveaway!

30 comments

Who do not like free stuff? Today, I’m glad to announce a new giveaway on WPRecipes: Enter the contest and try to win 5 WP Theme Generator licences. The only thing you have to do is to tweet about WP Theme Generator.

Post Pic

How to automatically create meta description from content

2 comments

By default, WordPress do not add a <meta description> tag to your blog. While not necessary, some SEO experts insists that this tag is important for your site SEO. So what about generating one using your post content? Here is a cool piece of code to do it easily.

Post Pic

How to Remove the Width and Height Attributes From WP Image Uploader

4 comments

When you upload images via WordPress image uploader and insert it into your posts, WordPress automatically include the image width and height attributes in the html <img> tag. But when using a responsible theme, this can cause lots of trouble. Here’s a quick recipe to get rid of those attributes.

Post Pic

How to test if a plugin is active

3 comments

When developing a WordPress theme, you often want to rely on a plugin. For example, I have seen many themes which relied on the Wp-PageNavi plugin for their pagination. But if the end user do not have the plugin installed, the code is broken and you can’t use the theme. Happily, there’s a WP function named is_plugin_active() that you can use to test if a plugin is active.

Post Pic

How to redirect users to a random post

4 comments

What about giving a new life to your old posts by creating a page template that will redirect readers to a random post? Today, I’m going to show you how to easily create this kind of page.

Post Pic

How to disable plugin updates on your WordPress blog

12 comments

By default, WordPress automatically checks if plugins updates are available, and if yes, ask you to install it. It is useful in most cases, but when building websites for clients you may not want them to updates plugins, for example if you modified a plugin especially for them. Here is an easy way to disable plugin updates on any WordPress blog.

Page 1 of 5612345678»...Last »
WP Theme generator

Sponsored Likebox