Results 1 to 5 of 5

Thread: Use WP_query instead of query_post to request posts ?!

  1. #1
    Thread Starter
    Junior Member cgervereau's Avatar
    Join Date
    Jul 2010
    Location
    Morocco
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,958
    Thanks
    169
    Thanked 3,405 Times in 3,276 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Marketplace Seller mr_green's Avatar
    Join Date
    Aug 2010
    Posts
    953
    Thanks
    113
    Thanked 192 Times in 147 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Best

  4. #4
    Thread Starter
    Junior Member cgervereau's Avatar
    Join Date
    Jul 2010
    Location
    Morocco
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    Thread Starter
    Junior Member cgervereau's Avatar
    Join Date
    Jul 2010
    Location
    Morocco
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pagination/ Query_post Issues
    By michaeldante in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: December 12th, 2010, 09:25 AM
  2. Replies: 3
    Last Post: November 30th, 2010, 06:43 AM
  3. 400 Bad Request
    By geno in forum ClassiPress General Discussion
    Replies: 3
    Last Post: October 22nd, 2010, 01:27 PM
  4. Blog Posts vs. Ad Listing Posts?@!%?
    By pruittdee in forum Report ClassiPress Bugs
    Replies: 10
    Last Post: April 17th, 2010, 05:17 AM