WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
not using single.php? (3 posts)

  1. twelfthdragon
    Member
    Posted 3 years ago #

    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.

  2. Heyda
    Member
    Posted 3 years ago #

    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.

  3. Matt Wiebe
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic