template tags tips

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.