Get Posts from main Blog limited by post-type and term
-
Trying to list the New Zealand Staff from blog 1 into blog 2. The code bellow is almost there, the problem is that it gets all the staff and seams to ignore the taxonomy parameter
<?php global $switched; switch_to_blog(1); //switched to main blog // Get latest Post $staff = query_posts(array( 'post_type' => 'staff', 'posts_per_page' => -1, 'destination' => 'nova-zelandia' ) ); ?> <?php if ( have_posts()) : ?> <ul class="posts"> <?php while ( have_posts() ) : the_post(); ?> <li><?php the_title(); ?></li> <?php endwhile; wp_reset_query(); ?> </ul> <?php endif; ?> <?php restore_current_blog(); //switched back to main site ?>
an I missing any global variable or some other trick? Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get Posts from main Blog limited by post-type and term’ is closed to new replies.