Filter result of Custom Post Type using meta_query with ACF

For meta_query with ACF and ordering price by ASC or DESC try following code. $args = array( ‘post_type’ => ‘property’, ‘posts_per_page’ => -1, ‘meta_key’ => ‘price’, ‘orderby’ => ‘meta_value_num’, ‘order’ => $_GET[‘orderby’], ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘contract’, ‘value’ => $_GET[‘contract’], ), array( ‘key’ => ‘rooms’, ‘value’ => $_GET[‘rooms’], ), … … Read more

Shortcode with loop stacks output

Ok…So, I was able to find an example that helped: function faq() { $output=””; $query = new WP_Query( ‘post_type=faqs’ ); if ( $query -> have_posts() ) : while ( $query -> have_posts() ) : $query -> the_post(); $output .= ‘<h3>’.get_the_title().'</h3>’; $output .= ‘<p>’.get_the_content().'</p>’; endwhile; endif; wp_reset_postdata(); return $output; } add_shortcode( ‘faqs’, ‘faq’ ); This puts … Read more