Append HTML Using Shortcode
First things first. You shouldn’t really use echo inside a shortcode, unless there is NO way to return the value. In your case your can simply convert it to a function that returns a value: function date_important_info(){ return display_date($date); function display_date($date){ $data = ” <div id=’my-shortcode’ style=””> <span>Date:</span> <span> {$date} </span> </div>”; return $data; } … Read more