Use WP_query instead of query_post to request posts ?!
Hello,
I tried unsuccessfully to get an external loop to the blog to get a list of ads
in a specific category (taxonomy now!).
For this, I simply replaced by new wp_query the existing query_posts with the same arguments.
Like this :
Code:
$args = array(
'post_type' => 'ad_listing',
'post_status' => 'publish',
'ad_cat' => 'my_category',
'showposts' => 10,
'orderby' => 'rand'
);
$my_query= new WP_query($args);
while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate[$post->ID] = $post->ID;
Unable to get category, all messages are displayed !!!
I'm going crazy, after 3 days I'm looking in all the forums ....
I am appealing to really competent developer to take me out of this problem