I don’t believe you can use multiple meta_key and meta_value arguments like that.
You might have to restrict your query to just posts that have a meta_value=Road2Africa
then you don’t need to orderby meta_value. Could just use this:
$myposts = get_posts('numberposts=300&category=3&orderby=title&order=ASC&meta_key=land_label&meta_value=Road2Africa');
Also, looking at that, the category=3
doesn’t work with the meta_key arguments. You’d need to use the category__in
argument such as this example:
<?php
$args=array(
'category__in' => array(3),
'meta_value'=> 'Road2Africa',
'meta_key' => 'land_label',
'orderby' => 'title',
'order' => 'ASC',
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 300,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
echo 'List of Posts';
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
<?php
endwhile;
}
wp_reset_query(); // Restore global post data stomped by the_post().
?>