I need to only display a certain category from a query:
$letters = $wpdb->get_col(
“SELECT DISTINCT LEFT(post_title,1) AS first_letter FROM
WHERE post_type = ‘$post_type’ AND post_status = ‘publish’
ORDER BY first_letter ASC”
Please could someone tell me how to do this? I haven’t got the first clue!
- The topic ‘Add a specific category to a query’ is closed to new replies.