Shortcode to Show the Time in WordPress Aug 1, 2020 | WordPress function x_shortcode($atts){ return current_time("F j, Y, g:i a"); } add_shortcode( 'shortcode-x', 'x_shortcode' ); This will display the time in WordPress. Takes any PHP date() parameters.