Related posts using wp_get_object_terms
-
I’m trying to figure out a way to dynamically pull in posts based off of the posts attached taxonomy terms in a custom post type.
I have a custom post type ‘Products’ set up with a few associated custom taxonomies. The one I’m trying to target for this project is ‘Vendors’ (slug = product-vendor).
I need to figure out how to do this dynamically because there are 30 vendors and they wil be adding more every once in awhile, I don’t want to do and if statement for every single one… or I’ll have to update the theme everytime they add a new vendor.
There will only be 1 vendor attached to each product, so I thought this would be the best way to get it to pull the most recent 5 products.
[Code moderated as per the Forum Rules. Please use the pastebin]
I only get a blank white page. What am I missing
Any thoughts?
- The topic ‘Related posts using wp_get_object_terms’ is closed to new replies.