I’m new to PHP and WordPress 3.1 Custom Post Types and Taxonomies. I’ve created the title so others can easily find this solution later.
For a client, I have made my own custom post types with their own custom taxonomies in functions.php.
Now I want to use the single.php to grab the Custom Field $key by $value, if it exists. If that $value is “youth”, I want to pass that value into a function that will query my site for the custom taxonomy that I made and if it finds data, it will show that data. The data that’s in the custom post type. I want to display that custom post type’s excerpt() and title().
This is an author’s site. The single.php displays a book and information related to it. At the bottom, I want to pull in reviews based on which custom taxonomy they are a part of (these taxonomies are tied to the custom post types). So if the book is about youths, I want to pull my reviews organized by the custom taxonomy, youths.
I feel I’ve tried all that I could find to implement, but I haven’t gotten over the learning curve enough to understand why it doesn’t work, so I’m not able to fix it.
Actually am looking for something close to what you have just said. Am new to wordpress and am making a wordpress which involves products. I have created a custom post type for the products and added 3 custom taxonomies to the product post type. My aim is to have a product to belong to product_category,product_brand and product_type. Then I would like to have a query which will return the products with their respective category, brand and type. Is that really possible? If so I will really appreciate your help. Here is my functions file (http://codepad.org/opDNhZPf)
Thanking you in advance as am waiting to hear from you