• Hi , could you please help to convert this $args in to ajax loadmore shortcode

     $args = array(
            'post_status' => 'publish',
            'posts_per_page' => -1,
    	 'post_type' => 'product',
            'orderby' => 'title',
            'tax_query' => array(
            'relation' => 'AND',
    		       array(
    			  'taxonomy' => 'product_cat',
    			  'field'    => 'slug',
    			   'terms'    => array( 'red' ),
    				),
    			 array(
    			     'relation' => 'OR',
    				array(
    				  'taxonomy' => 'product_cat',
    				  'field'    => 'slug',
    				  'terms'    => array( 'hard' ),
    						),
    				 array(
    				   'taxonomy' => 'product_cat',
    				   'field'    => 'slug',
    				   'terms'    => array( 'soft' ),
    					),
    				),)
         );	   
    	
Viewing 1 replies (of 1 total)
  • Thread Starter Michael Cairns

    (@newdrop20)

    any update , please reply .. Because currently i can use only one relation in short code so if i need a product post type when this is coming under red & soft & hard then i can use the following short code

    
    [ajax_load_more post_type="product" posts_per_page="4" 
    taxonomy="product_cat:product_cat:product_cat" 
    taxonomy_terms="red:hard:soft" 
    taxonomy_operator="IN:IN:IN"]

    But what i need is Product post type coming under (red & (soft || hard))
    So please help

Viewing 1 replies (of 1 total)

The topic ‘Covert $args in to shortcode’ is closed to new replies.