WordPress Shortcode - Change Layout Based On Attribute -
i have following custom shortcode displays custom post type of staff members in defined taxonomy of "type". i'm trying add second attribute allow user define layout style of output, example columns or rows. here envision shortcode looking like: [staff type="international" style="rows"] i think have coding getting attributes, including setting default values, can't seem figure out how if statement in there alter output. seems should go right before first "$output .=" line. function get_staff($atts) { extract( shortcode_atts( array( 'type' => 'international', 'style' => 'rows' ), $atts ) ); add_filter( 'posts_orderby' , 'posts_orderby_lastname' ); $loop = new wp_query( array ( 'post_type' => 'staff', 'orderby' => 'title', 'staff-type' => $type, ...