WordPress.org

Support

Support » Plugins and Hacks » The Events Calendar » [Plugin: The Events Calendar] not using single.php?

[Plugin: The Events Calendar] not using single.php?

  • I am using premium version 1.0.

    I put the template files into /events inside my theme folder as per instructions.

    The event page should be using single.php yet it is not. it’s still using list.php. how to get it to use single.php?

    thanks. really great plugin. the best.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had the same problem.

    – open events/the-event-calendar.class.php
    – back up this file.
    – go to line 733.
    – select lines 733 – 758 (function templateChooser)
    – paste this code:
    public function templateChooser($template) {

    // hijack to iCal template
    if ( get_query_var(‘ical’) || isset($_GET[‘ical’]) ) {
    $this->iCalFeed();
    die;
    }

    if( is_feed() || get_query_var( ‘post_type’ ) != self::POSTTYPE ) {
    return $template;
    }

    $this->constructDaysOfWeek();

    // single event
    if ( is_single() ) {
    return $this->getTemplateHierarchy(‘single’);
    }
    // list view
    elseif ( sp_is_upcoming() || sp_is_past() ) {
    return $this->getTemplateHierarchy(‘list’);
    }
    // grid view
    else {
    return $this->getTemplateHierarchy(‘gridview’);
    }

    }

    – now it should be ok
    All I did was change the order in the function.

    Remember if you update the plugin, this modification will probably be lost. But for now it should help you out.

    Hey guys. I’m one of the devs on The Events Calendar Pro. We’ve heard a few complaints about this, and I’ll be including Heyda’s switch of single and list view in the soon-to-be-released 1.1 update.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: The Events Calendar] not using single.php?’ is closed to new replies.
Skip to toolbar