Preferred Method of debugging a wordpress SQL calls?

Turn on define( ‘WP_DEBUG’, true ); and define( ‘SAVEQUERIES’, true ); . I prefer the format of the debug bar, http://wordpress.org/extend/plugins/debug-bar/ , which can be combined with the console, http://wordpress.org/extend/plugins/debug-bar-console/ . This script is great for profiling, Best Collection of Code for your functions.php file There are some other plugins that might help, like Debug … Read more

$wpdb->flush(); breaks the loop

In the code you posted in your other question, your call to flush() is using the wrong variable: $wpdp->flush();. Since this is an undefined variable, it’s likely that you’re simply getting a PHP runtime error at this point, stopping page execution.

Store records for a table in wordpress

You could use the WP-Table-Reloaded Plugin: http://wordpress.org/extend/plugins/wp-table-reloaded/ Screenshots are on the plugin author’s website: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/

WordPress Custom Content and Taxonomy’s Archives

Firstly, the ‘future’ status is for posts that are not yet published and should not be used to mark events that occur in the future. (I would recommend storing the event’s data in the post meta, and then query/order by that post meta field. See this question and this question) Secondly, in your code you … Read more

How can I set a default category for a custom post type in wordpress?

The problem with ‘save_post’ is that it gets called when you actually change something on the post edit page, if you just click the update button without changing anything, it doesn’t get called. So, i would say use ‘pre_post_update’ action hook instead of ‘save_post’ or use both. Also for debugging try put some test code … Read more