Title: Shortcode alternative in templates
Last modified: August 21, 2016

---

# Shortcode alternative in templates

 *  Resolved [rustyrust](https://wordpress.org/support/users/rustyrust/)
 * (@rustyrust)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-alternative-in-templates/)
 * Hello,
 * I’m trying to call and display jobs and forms directly in my templates files 
   using php. I certainly could use the <?php echo do_shortcode(“[shortcode]”); ?
   > but is there a more proper way to do this? Maybe a function with parameters?
 * Thank you
 * [https://wordpress.org/plugins/wp-job-manager/](https://wordpress.org/plugins/wp-job-manager/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-alternative-in-templates/#post-5025157)
 * It depends what you want to output. You could take the code from within the shortcodes
   and use that instead of do_shortcode. Which shortcode are you wanting?
 *  Thread Starter [rustyrust](https://wordpress.org/support/users/rustyrust/)
 * (@rustyrust)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-alternative-in-templates/#post-5025160)
 * Job dashboard and resume dashboard.
 *  Plugin Author [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-alternative-in-templates/#post-5025177)
 * Those actually are a little more complex because it has handlers which specifically
   look for the shortcode e.g. if shortcode is on this page, look for X variable
   and do something.
 * If you do use do_shortcode, or copy code from the functions, this may not trigger:
 *     ```
       public function shortcode_action_handler() {
       		global $post;
   
       		if ( is_page() && strstr( $post->post_content, '[job_dashboard' ) ) {
       			$this->job_dashboard_handler();
       		}
       	}
       ```
   
 * In which case it will also need to be manually called.
 *  Plugin Author [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-alternative-in-templates/#post-5025178)
 * Maybe it would be better to use the shortcode in the post content as normal, 
   but move the the_content() function around your template instead.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Shortcode alternative in templates’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager/assets/icon-256x256.gif?rev=2975257)
 * [WP Job Manager](https://wordpress.org/plugins/wp-job-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-alternative-in-templates/#post-5025178)
 * Status: resolved