Reading your question, I think you are calling [get_employee]
directly from a PHP template file in your child theme. This is not the way shortcodes work. You have three options:
- Put
[get_employee]
in the content of a post - Run
do_shortcode("[get_employee]")
wherever you want in a template file - Call directly the function callback wherever you want in your template file
Detail info in the Shortcode API.
Also note that your are using the class $DB
and its method RunSelectQueryWithPagination()
but there is not initialization before you use it. Also, there no definition for $busCount
and $obj
, so in the case your shortcode runs correctly I think you won’t get the desire output.