Home » Archive

Articles tagged with: queries

  Posted: May 11 | Filed under: Wordpress

For a developer loading speed is a crucial factor, therefore it is necessary to check how many SQL queries are needed to build a page.

To do that in Wordpress add this code anywhere in your template and it will show the queries that are needed until that specific part. If you want to know how many queries are needed for loading the full page then put the code in the footer.php

<? php echo get_num_queries(); ?>

You are able to use it several times inside your template, so insert it anywhere as many times as required.That’s great for locating potential “troublemakers”

Source:Playworkplay.com