Posts Tagged ‘wordpress’

WordPress Performance

Tuesday, March 24th, 2009

Just a little nice to have feature on your WordPress site.   You can place the following code in your footer.php to display the number of queries and amount of time taken for the page to load.  This version will only be displayed if the user is logged in due to the if statement.

<?php if (is_user_logged_in()) { ?>
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.
<?php } ?>