Best way to programmatically link to multiple categories (union/intersection) [closed]

It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. This question assumes that you know about the … Read more

“NOT ONLY IN” taxonomy query operator?

I have multiple users adding content to restricted categories (using RoleScoper) in my WordPress setup that don’t show up on the homepage (custom template with query_posts()). I’m looking for a way to “promote” the submitted content to the homepage by adding it to another category. My loop code looks like this: <?php query_posts($query_string . ‘&cat=-37’); … Read more

Taxonomy , subtaxonomy,child taxonomy of a product woocommerce

Hi i need to get the main taxonomy and sub taxonomy of a product in woocommerce . i know how to get taxonomy details .123 is product id . $terms = get_the_terms(123, ‘product_cat’); I know how to get taxonomy name also echo $terms[0]->name But my need is: Nokia 3110 is my mobile . So it … Read more

Group Custom post type in a page by its taxomony tag

I hope i can write a clear question since i got confused trying to solve this… I got a custom post type… that custom post type has taxomony (category like) and i want to return a structure like this in a page that show all posts of that post type.. ——————————————— DESIRED STURCTURE taxomony category … Read more

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 of the post data? I would assume it is most definitely possible. I would also assume it requires some massively long … Read more

SQL Statement generated by WP_Query not producing expected results

I am trying to alter WP_Query on the pre_get_posts action hook, for filtering the posts returned, depending on the built-in category and post_tag taxonomies. I would like that the only posts returned by the query have either both taxonomies not registered at all, or no term is set for both taxonomies for the post, or, … Read more

Counting number of posts with Category B in Category A

I’m currently building my own backlog tracker and have gotten to a point where I just have no idea how I’m going to do this. I have multiple status categories (for example; beaten and completed) and categories for the consoles (for example PS4 and Nintendo Switch). Now I want to display how many games(posts) I … Read more