WpCode.net

Daily Wordpress Code Snippet

June 28, 2011
by Pigi
0 comments

How to allow Contributors to add media

If you have a multiauthors blog, and use the “contributor” role to moderate articles you could add this snippet to allow your users (contributors) can add also media.

By default the add post interface doesn’t include the media selection for the contributors. To do this just paste the following snippet on the theme’s function.php Continue reading

June 24, 2011
by Pigi
0 comments

How to enable “Posts Formats”

In this wordpress tutorial i’ll show you how to add posts formats to your wordpress theme. Using the post formats you will have the ability to create different kind of post, such as gallery, links or status message.

You need to customize not only your theme, but also your css, your home page and your archives pages to display published posts format. Continue reading

June 23, 2011
by Pigi
0 comments

Related posts plugins and caching problems

For a long time i’ve used on my wordpress blog plugins to display related posts at the bottom of the content, but some days ago I’ve noticed of a certain slowness of my websites, somethings like 20-30 seconds to generate post preview, browsers error while post charges.

I thought that was a hosting’s problem, and really was. After 2-3 days hostgator solved that problem, but blog was also slow, very slow. Continue reading