reviews shortcode
Reviews shortcode
// Add Shortcode function reviews_custom_shortcode( $atts , $content = null ) { // Attributes extract( shortcode_atts( array( 'number_of_reviews' => '10', 'order_by' => 'COUNT', ), $atts ) ); // Code $reviews_query = new WP_Query(array('post_type'=>'reviews'); } add_shortcode( 'reviews', 'reviews_custom_shortcode' );