Results 1 to 1 of 1

Thread: wp_query Classipress

  1. #1
    Thread Starter
    Amateur cypco's Avatar
    Join Date
    Apr 2012
    Location
    Colombia
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    wp_query Classipress

    Good morning,

    I am trying to accomplish a custom searchform with multi-level fields. I am using the wordpress categories to achieve the multi-level part.

    To do this, I first developed everything on theme TwentyTwelve, and once it was working, I proceeded to place it on Classipress.
    First, I will implement it on a parent, and when it works on a parent, I will proceed to a child theme.

    I already have my searchform developed, it also has de multi-level (3 levels) working correctly and other custom fields. (Please see next image).
    searchform.jpg

    NOTE: If anyone is interested in the code, just tell me and I will post it...
    NOTE 2: I am not styling it yet... after it works correctly, I will put it "nice"
    NOTE 3: for the multi-level to work, it was necessary to comment wp_enqueue_script( 'selectbox................. in the file /includes/theme-enqueue.php
    and comment
    Code:
    /* style the select dropdown menus */
    /* $('select').selectBox({
    menuTransition: 'fade', // default, slide, fade
    menuSpeed: 'fast'
    }); */
    in includes/theme-scripts.js


    Now what I'm missing is the query modification.

    This is the coding on TwentyTwelve for that part:

    Code:
    $args = array(							
    				cat => $cat1,
    					
    				'meta_query' => array(							
    					array(
    						'key' => 'Ano',
    						'value' => array( $ano_desde, $ano_hasta ),
    						'type' => 'numeric',
    						'compare' => 'BETWEEN'
    					),
    						
    					array(
    						'key' => 'Precio',
    						'value' => array( $precio_desde, $precio_hasta ),
    						'type' => 'numeric',
    						'compare' => 'BETWEEN'
    					),
    
    					array(
    						'key' => 'Ubicacion',
    						'value' => $ubicacion,							
    						'compare' => 'LIKE'
    					)					
    						
    				)
    			);
    										
    			$the_query = new WP_Query( $args );
    Could someone please tell me:
    1. Is it possible to use wp_query in Classipress?
    2. If answer 1. is yes, where or how can I do this?

    Any help is greatly appreciated.
    Thanks in advance.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Fatal error: Call to undefined method WP_Query
    By safudin in forum Help Using Vantage (Legacy)
    Replies: 1
    Last Post: November 7th, 2012, 04:32 PM
  2. [MOD NEEDED] Use WP_query instead of query_post to request posts ?!
    By cgervereau in forum ClassiPress General Discussion
    Replies: 4
    Last Post: January 30th, 2011, 03:42 AM