0
votes
0answers
15 views

Get Posts by tag from a custom taxonomy

I have a custom post type called product, which have two custom taxonomies named as product_tags & product_categories. In My Product Categories archive page, I am listing tags. My requirement ...
1
vote
1answer
45 views

Get posts from taxonomy URL

How can I get the posts from a custom taxonomy using the URL to determine which taxonomy term id is being shown? I tried to get posts via a category using get_category_by_path which returned false ...
0
votes
0answers
27 views

Issue with recent custom post type permalink

I'm using the following code in my footer to get the latest posts from specific custom post type. <?php //WordPress loop for custom post type with taxonomy $my_query = new ...
0
votes
0answers
20 views

return custom taxonomy terms in post object

How would I go about returning the custom taxonomies in the post object with WP Query or with get_posts for that matter. yes, I know I can loop over my query and use get_terms or a number of other ...
0
votes
1answer
199 views

Can't pull posts of a Custom Post Type based on the custom taxonomy of the CPT

My question is about retrieving custom post types via get_posts, when custom post types also have a custom taxonomy. I can use get_posts to retrieve all posts of a custom post type, but when I attempt ...
0
votes
2answers
1k views

Custom Taxonomy with tax_query

So I've created a custom taxonomy type with a plugin (CMS Press) and now I'm trying to get all of the posts with the taxonomy terms in that taxonomy. My get_posts looks like this: $args = Array( ...
0
votes
1answer
264 views

Display a random customposttype2 excerpt in single-custompostype1.php that shares same taxonomy

OK - Looked everywhere for this one. Details: Custom Post Type #1 = 'product' > registered taxonomy 'productranges' Custom Post Type #2 = 'testimonial' > registered taxonomy 'testimonials' Both ...
0
votes
1answer
2k views

How to query custom post type by term?

This seems trivial but I can't get it to work. Here's my code: $args = array( 'numberposts' => -1, 'eventcategory' => 'nice-events', ...
3
votes
3answers
10k views

get_posts assigned to a specific custom taxonomy term, and not the term's children

Say I have the following taxonomy terms: Term 1 Term 1.1 Term 1.2 Term 2 Term 2.1 How can I get only posts that are assigned to Term 1 and not include those that are assigned to Term 1.1 or ...
0
votes
1answer
752 views

List one post only from each subcategory using get_posts?

Custom Post Type = 'projects' with a Hierarchical Taxonomy = 'projects_category' projects - big-corporates -- company one ---- first project 1 ---- second project 1 ---- third project 1 -- company ...
3
votes
1answer
5k views

Get term SLUG by term ID

I have a hierarchical taxonomy called 'tarefa' I have to display all posts from a child taxonomy. I used get_term_children function function to verify if the taxonomy parent has children. If the ...
5
votes
3answers
3k views

Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?

(Moderators note: Was originally titled "How to get_posts of a custom post type that is in two custom taxonomies?") I have a custom post type that has two taxonomies which are separate, one called ...