[wp-hackers] Accessing custom post types and taxonomies across sites on a network

Cornelius, Gregory gcorne at bu.edu
Tue Jan 25 15:05:51 UTC 2011


My mistake. I didn't dig deep enough into the stack.

get_terms requires that the taxonomy be a registered taxonomy, which makes sense.

On Jan 24, 2011, at 7:56 PM, Bill Dennen wrote:

> On Mon, Jan 24, 2011 at 5:45 PM, Cornelius, Gregory <gcorne at bu.edu> wrote:
>> After looking at your initial code again and WP_Query, I suspect that if you specify the term *and* the taxonomy, the fact that the taxonomy is not registered will not matter.
> 
> Thanks. This does not seem to work in 3.0.4. If the taxonomy is not
> registered (locally), I get nothing.
> 
> That is, it doesn't work with this:
> 
> $args = array (
> 
> 'post_type' => 'faculty_profile',
> 'orderby' => 'meta_value',
> 'meta_key' => 'sortby',
> 'order' => 'ASC',
> 'posts_per_page' => -1,
> );
> 
> if ( $dept ) {
> 
> $args['taxonomy'] = 'departments';
> $args['term'] = $dept;
> 
> }
> 
> $dept is the value of $_GET['dept'] (for testing).
> 
> -Bill
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list