How to create a short code in wordpress?
Create a short code in wordpress
function my_shortcode() { //buffering //Object Start ob_start(); date_default_timezone_set('asia/kolkata'); //echo date('H:i:s'); echo '<div id="mytime"></div>'; // object get contents $output_string = ob_get_contents(); // clean object ob_end_clean(); return $output_string; } add_shortcode("clock","my_shortcode");
POST COMMENTS