code or in your wordpress theme’s functions.php file soÂ
that those php codes within the function can be run.
Â
Following is a example of how to add shortcode function Â
in functions.php file.
Â
function doctors_shortcode( $atts ) {
  //Add any kinds of php codes here Â
  //following codes just display a hello text Â
  $return_data="";
  $return_data.='<div id="primary" class="site-doc-main"> Hello ';
  $return_data.='</div>'; return $return_data;
}Â Â Â Â Â
add_shortcode('DoctorShortcode', 'doctors_shortcode' );
Â
Now Enter [DoctorShortcode] somewhere within a page or post to display theÂ
result of the doctors_shortcode() function.
Follow my next post about Parameterized shortcodes.Â
Â
Don't forget to like & share it.Â
Connect with me if you want to learn more - https://www.fiverr.com/mitsol ,Â
My professional plugin -Â
https://wordpress.org/plugins/facebook-wall-and-social-integration/