WordPress Plugin Query

I am often cutting and pasting this in wordpress plugins

$query = “SELECT id, post_title FROM ” . $wpdb->prefix . “posts WHERE post_type = ‘wpf_venue’ AND post_status=’publish’”;
$venues = $wpdb->get_results ( $query, ARRAY_A );

This entry was posted in plugins, Wordpress and tagged , , , , . Bookmark the permalink.

Comments are closed.