General, — January 30, 2009 — 1 Comment
WordPress – Add DB Queries and Loading Time to Footer
Tweet
This post was published 3 years 4 days ago. In SEO, things change quickly and this advice might be out of date. Just wanted to let you know before acting on the advice. :)
This post was published 3 years 4 days ago. In SEO, things change quickly and this advice might be out of date. Just wanted to let you know before acting on the advice. :)Once you know the code, it’s pretty simple to implement. Without the code, good luck!
Open up your WordPress admin and navigate to Appearance > Editor. Click on Footer on the right side. Find the bottom of your footer, near your copyright.
Put this code in wherever you want it.
<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds.
There you have it. You can add something like this if you want to:
This page called the database <?php echo $wpdb->num_queries; ?> times and was loaded in <?php timer_stop(1); ?> seconds.
Post a comment if you have problems.
Related posts:






Just found this through a google search. Thanks a lot I’ve been trying to write the code for 30 minutes!