Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    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

    (@rustyrust)

    Job dashboard and resume dashboard.

    Plugin Author Mike Jolley

    (@mikejolley)

    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

    (@mikejolley)

    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.