WordPress Wp query cheatsheet

WordPress Wp query cheatsheet

see it here purchase Lyrica canada


$args = array( 
				'post_type'				=> 'product',
				'post_status' 			=> 'publish',
				'ignore_sticky_posts'	=> 1,
				'posts_per_page' 		=> 15,
				'offset' => $offset,
				'meta_query' 			=> array(
					array(
						'key' 			=> '_visibility',
						'value' 		=> array('catalog', 'visible'),
						'compare' 		=> 'IN'
					), 
		            array(
		                'key' => '_price',
		                //'value' => number_format($lowestprice, 2, '.', '') ,
		                'value' => $lowestprice,
		                'compare' => '>=',
		                'type' =>DECIMAL
		            ),
		            array(
		                'key' => '_price',
		                'value' => $hoogsteprijs,
		                'compare' => '<=',
		                'type' =>DECIMAL
		            )
        
				) 
			);

	$tax_query[] = array(
						'taxonomy' => $k,
						'field'    => 'slug',
						'terms'    => $v,
						'operator' => $op
					);
$args['tax_query'] = $tax_query;	

$query = new WP_Query($args);
$posts = $query->get_posts();