Wordpress Gurus?

Associate
Joined
21 Oct 2008
Posts
1,679
Location
Mooching... in your house
Ho-kay, you're going to have to bear with me...

I would like to create a WP_Query that returns items from a specific custom post type (testimonials) that are also tagged with a certain tag (this far is fine)... problem is they are not global tags but a custom taxonomy to restrict these tags to just this custom post type (taxonomy-tags)...

so, I expected this to work:

PHP:
WP_Query('post_type=testimonial&testimonial-tags=print');

the custom taxonomy is created here:

PHP:
register_taxonomy( 'testimonial-tags', 'testimonial',
		array(
			'hierarchical' => false,
			'label' => __('Testimonial Tags'),
			'query_var' => 'testimonial-tags',
			'rewrite' => array('slug' => 'testimonial-tags' )
		)
	);

^^ god knows how, but this seems to know I wanted it to work like a normal tags field in the admin, and just... works...

so, can you see what I'd like to do? any ideas?
 
I imagine you've read this.. several times.. http://codex.wordpress.org/Taxonomies

When you say "god knows how" are you referring to the automatic meta box creation in the admin area for the tags?

I see what you are trying to do, but not sure on where the issue is. Is your print tag used in other areas and it's pulling through items that it shouldn't?
 
Back
Top Bottom