Add ID to output only for first option
Instead of using an if check, use filter_var() so that any boolean-ish value can be passed in the shortcode attribute; e.g., yes, no, on, off, true, false, 0, 1. $no = filter_var( $no, FILTER_VALIDATE_BOOLEAN ); Now, $no is either true or false (boolean). Sorry, I see $no is actually a number. My mistake. if ( … Read more