[Plugin: The Events Calendar] Code suggestion for including templates
-
Hello,
In the-events-calendar.php, may I suggest that templates are loaded using the wordpress functions, as this will support child themes fully.
The current code is:
if (file_exists(TEMPLATEPATH.'') ) { include (TEMPLATEPATH.'/events/list.php'); } else { include dirname( __FILE__ ) . '/views/list.php'; }
where as the wordpress method is:
$templates[] = "/events/single.php"; if ('' == locate_template($templates, true)) { load_template( dirname( __FILE__ ) . '/views/single.php'); }
I’d also suggest using get_header() and get_footer() in the template files for much the same reason.
Cheers,
Pete Wilson
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: The Events Calendar] Code suggestion for including templates’ is closed to new replies.