1
vote
1answer
1k views

using $wpdb to get custom post type with term

I'm trying to get the title of the first custom post type with a specific term in a taxonomy. But I'm not great at SQL so therefor not great with using $wpdb. Here is my code: $posts = ...
2
votes
1answer
294 views

Get terms that contain posts that in turn belong to other terms?

So I have custom taxonomy called "shape" and another one called "color". If I want to get the list terms under shape that contain posts that are also present in terms under color, how do I do that? ...
1
vote
1answer
1k views

How to Get All Taxonomies AND All Terms For Each Taxonomy With Post Count Zero

Is there an easy way of obtaining every registered taxonomy and for each registered taxonomy, get all the terms for that taxonomy, and for each term, get the post count, without actually fetching all ...
0
votes
1answer
121 views

Altering term_id and name via $wpdb class

$s = $_POST['submitterms']; $querystr = " SELECT $wpdb->terms.* FROM $wpdb->terms WHERE lower($wpdb->terms.name) like '%$s%' "; ...
0
votes
1answer
125 views

How to create a list of terms who's posts also have a predefined external term?

I have a pretty extensive music collection and my friends are always borrowing my stuff. I would like to keep better track of my library so I'm building a sudo-checkout system using WP. The ...