0

How can I retrieve the actual SQL query generated by the function wp_list_categories() in WordPress?

I have created a custom post type and custom taxonomy (associated this with my custom taxonomy).

I have following code for retrieving a list of items from my taxonomy:

$args = array('taxonomy' => 'movies_taxonomy',
    'depth' => 1,
    'exclude' => 16,
    'echo' => 0,
    'hierarchical' => true,
    'hide_empty' => false,
    'show_count' => 1,
    'title_li' => '');

echo wp_list_categories($args);

The above argument is giving me wrong result. So I want to see what exact query it is sending to the database for fetching records.

How can I get that?

halfer
  • 19,824
  • 17
  • 99
  • 186
Subrata Sarkar
  • 2,975
  • 6
  • 45
  • 85

0 Answers0