• Hi,

    the following line in checkfront.php prevents the scripts from loading if the shortcode doesn’t exist, however it only checks the_content preventing the plugin from working in a sidebar or elsewhere in a template.

    I’ve adjusted my version but would it be possible to make this a little more flexible in the official plugin?

    // does this page have any shortcode.  If not, back out.
    	if($pos = stripos($post->post_content,'[checkfront') or $pos === 0) $embedded = 1;

    http://ww.wp.xz.cn/plugins/checkfront-wp-booking/

The topic ‘statement prevents shortcode working outside the_content’ is closed to new replies.