Results 1 to 2 of 2

Thread: Return all ads from subcategory (taxonomy 'tag')

  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

    Question Return all ads from subcategory (taxonomy 'tag')

    Hi all,

    I search on the internet and in your forums for many weeks a way to view all ads in a subcategory but impossible.

    I think it is a fairly simple request but I confess I'm not really a professional php developper.

    information:
    I have a main category: Apple
    In this category, there is a sub category: iPhone (Taxonomy tag)

    Being a multi-site (the display should be on another site), I can not use the functions of classipress)

    I want to show only listings subcategory iPhone:

    For this I tried to use the two following queries but it still does not work.

    Code:
    SELECT * 
    FROM wp_3_posts
    INNER JOIN wp_3_postmeta ON ( wp_3_posts.ID = wp_3_postmeta.post_id ) 
    INNER JOIN wp_3_term_relationships ON ( wp_3_posts.ID = wp_3_term_relationships.object_id ) 
    INNER JOIN wp_3_term_taxonomy ON ( wp_3_term_relationships.term_taxonomy_id = wp_3_term_taxonomy.term_taxonomy_id ) 
    LEFT JOIN wp_3_terms ON ( wp_3_term_taxonomy.term_id = wp_3_terms.term_id ) 
    WHERE wp_3_terms.name = 'iPhone'
    AND wp_3_term_taxonomy.taxonomy = 'ad_cat'
    AND wp_3_posts.post_status = 'publish'
    AND wp_3_posts.post_type = 'ad_listing'
    ORDER BY wp_3_postmeta.meta_value ASC 
    LIMIT 0 , 30
    or this code :

    Code:
    $args=array(
    'post_type' => 'ad_listing',
    'taxonomy' => 'ad_cat',
    'post_status' => 'publish',
    'iphone' => $tax_term->slug,	
        			);
     
    $my_query = new WP_Query($args);
    Can you help me?

  2. #2
    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. Removing 'No Tag'
    By homme143 in forum ClassiPress General Discussion
    Replies: 20
    Last Post: March 12th, 2012, 02:18 PM
  2. [MOD NEEDED] Parent and Subcategory block and Posting in the Children of the Subcategory
    By dschn1978 in forum ClassiPress General Discussion
    Replies: 2
    Last Post: July 15th, 2011, 05:08 PM
  3. Return expiry date in another format
    By hugo in forum ClassiPress General Discussion
    Replies: 4
    Last Post: April 10th, 2011, 10:27 AM
  4. [SOLVED] Search return pagination bug (.4)
    By doctorcilantro in forum Report ClassiPress Bugs
    Replies: 5
    Last Post: January 27th, 2011, 04:36 PM
  5. [SOLVED] Problem with Pay Pal return - add-new-confirm
    By eyesea in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: January 12th, 2011, 04:41 PM