How to include Event List in own template?
-
OK I saw that very short information in FAQ on how to insert the event list in your own template, but there is no sample on how to include the file properly.
I have some problems to get it included. How do I get the path to the sc_events-list.php file? It doesn’t even work hard coded for me (damn windows server I guess).
plugin_basename(__FILE__) gives me: D:/www/www11/site/wp-content/themes/toxic/index.php. Does that help?
plugin_dir_path(__FILE__) gives me: D:\www\www11\site\wp-content\themes\toxic/
How do I include the sc_event-list.php properly? (It has to be possible to move the wordpress installation for going live from “/site/” to “/” )
Should this work?:
<?php $dir = "/site/wp-content/plugins/event-list/includes/sc_event-list.php"; require_once( $dir ); $EventList = SC_Event_List::get_instance(); echo $EventList->show_html("event-list num_events=3 show_filterbar=false link_to_event=false"); ?>
Also, this produces no output:
<?php echo do_shortcode( "[event-list num_events=3 show_filterbar=false link_to_event=false]" ) ?>
Thank you!
Chris
- The topic ‘How to include Event List in own template?’ is closed to new replies.