I am using this code to conditionally load some shortcodes but it doesn't work. The shortcodes are still loaded on template-flat.php. Any ideas what's wrong here?
if( is_page_template( 'template-flat.php' ) ) {
// other code
}else{
require_once(functions . '/shortcodes.php');
}
I think it's because the page call happens after the functions call in the wordpress actions order?
Aucun commentaire:
Enregistrer un commentaire