Add Shortcode

function my_shortcode() { 
 $message = 'Hello world!'; 
 // Output needs to be return
return $message;

} 
// register shortcode
add_shortcode('shortcodeNameToCall', 'my_shortcode');

Author: Wojciech Borowicz

I hope this post will help you to do what you need.
In case you want some assistance click here to get in touch 

check out other blog posts