Wordpress tips

WordPress is by far the most popular blog engine now, learn the tips to make the most out of it.

Make your WordPress install faster by removing unnecessary plugins
Published on December 24th, 2010

If you find that your WordPress install is running too slow or using too much memory, one easy way to release the weight on your server is to uninstall plugins. Many plugins functionalities of plugins can easily be replaced by updating your theme’s functions.php file.

Use WP CSS to improve your page speed
Published on December 23rd, 2010

This WordPress plugin will GZIP and remove whitespaces from your CSS files. It will also allow you to use @import inside a CSS file without worrying about what happens on the user’s side.

Get the latest sticky posts in WordPress
Published on December 23rd, 2010

If you want to feature some posts on your WordPress blog, sticky posts is the way to go. To get the latest sticky posts, find the loop and place this code before your Loop: $sticky = get_option(‘sticky_posts’); rsort( $sticky ); $sticky = array_slice( $sticky, 0, 5); query_posts( array( ‘post__in’ => $sticky, ‘caller_get_posts’ => 1 ) );

Display page loading time and queries in WordPress
Published on March 22nd, 2010

If your WordPress website is being too slow, one of the first things you should do it to find out the loading time and the number of queries. This can be simply done by adding the following template tags in your template: <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.

Use page templates for custom page layout in WordPress
Published on March 21st, 2010

Getting custom page layout in WordPress is not so hard, to do so proceed the following way: Check if your template includes a page-custom.php file, if it doesn’t you should create it by duplicating the page.php file. Copy the page-custom.php file, rename it to something relevant (for example: page-contact.php for a contact page with a custom layout). In the very beginning of the template file, add the following code: <?php /* Template Name: Contact */ ?> Customize your template. In your WordPress admin, under page editing, you should now have a drop-down listing all your pages in the “Template” box.