How to handle valueless attributes in shortcodes?
Use 0 and 1 as shortcode values and use that show or hide the HTML attribute. Example with an element input and the attribute required: function input_shortcode( $atts ) { $values = shortcode_atts( array ( ‘type’ => ‘text’, ‘value’ => ”, ‘name’ => ”, ‘id’ => ”, ‘required’ => 0, ), $atts ); $values = … Read more