• I am trying to use this plugin together with the BuddyPress (BP) plugin. However it appears that I may have an issue with the fact that BP uses Child Themes and The Events Calendar (EC) does not know where the real theme is. I created the events folder in my theme folder but the list.php file does not seem to get referenced. My first guess is that EC is looking in the BP template folder rather than my template folder. Is this the problem? Is there a known way to fix it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter drewmisterh

    (@drewmisterh)

    I made a change to the main plugin php file (the-events-calendar.php) to solve my problem. In the templateChooser function I added an additional conditional for each template type so that it looks like this.

    public function templateChooser() {
    			$this->constructDaysOfWeek();
    			if( !is_feed() ) {
    				// list view
    				if ( $this->in_event_category() && ( events_displaying_upcoming() || events_displaying_past() ) ) {
    					if (file_exists(STYLESHEETPATH.'/events/list.php') ) {
    						include (STYLESHEETPATH.'/events/list.php');
    					}
    					elseif (file_exists(TEMPLATEPATH.'/events/list.php') ) {
    						include (TEMPLATEPATH.'/events/list.php');
    					}
    					else {
    						include dirname( __FILE__ ) . '/views/list.php';
    					}
    					exit;
    				}
    
    				// grid view
    				if ( $this->in_event_category() ) {
    					if (file_exists(STYLESHEETPATH.'/events/gridview.php') ) {
    						include (STYLESHEETPATH.'/events/gridview.php');
    					}
    					elseif (file_exists(TEMPLATEPATH.'/events/gridview.php') ) {
    						include (TEMPLATEPATH.'/events/gridview.php');
    					}
    					else {
    						include dirname( __FILE__ ) . '/views/gridview.php';
    					}
    					exit;
    				}
    
    				// single event
    				if (is_single() && in_category( $this->eventCategory() ) ) {
    					if (file_exists(STYLESHEETPATH.'/events/single.php') ) {
    						include (STYLESHEETPATH.'/events/single.php');
    					}
    					elseif (file_exists(TEMPLATEPATH.'/events/single.php') ) {
    						include (TEMPLATEPATH.'/events/single.php');
    					}
    					else {
    						include trailingslashit( WP_PLUGIN_DIR ) . trailingslashit( plugin_basename( dirname( __FILE__ ) ) ) . 'views/single.php';
    					}
    					exit;
    				}
    			} // if is_feed()
    		}

    This will take ChildThemes into account as far as I can tell. There may be more that needs to be done but that is the first step. I hope this change can be reflected in the next update.

    DrewmisterH, are you using the BuddyPress plugin? I’m not using a child theme, but have adapted another for use in this site. I’m having issues with the style of the Calendar – it’s basically not fitting to the window and spreads across the window. Just curious if you had a similar issue? My events are listing fine.

    Thread Starter drewmisterh

    (@drewmisterh)

    @lyricalbiz – Yes I am using the BuddyPress plugin. And yes one of my issues with the Events Calendar plugin is things not fitting in the space I have. I commented on this in a follow-up thread. (http://wordpress.org/support/topic/400120) I am hopeful that the developer will add logic to the plugin to allow me to apply my own CSS to all the plugin elements.

    Hi DrewmisterH and lyricalbiz,
    I am also having trouble getting The Events Calendar to recognise my custom ‘events’ templates in my child theme. I have to move the ‘events’ folder with my custom templates into the parent theme.
    It sounds like the issue I am having is very similar to yours.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: The Events Calendar] Working with BuddyPress Child theme’ is closed to new replies.