Robert

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: How do I edit the "calendar of events" page? #13758
    Robert
    Member

    (You may also want to add ‘venue’ to that array.)

    in reply to: How do I edit the "calendar of events" page? #13752
    Robert
    Member

    Beth, here’s a bit of code I hacked up tonight to solve this same problem:


    add_action('template_redirect', 'events_calendar_template_redirect');

    function events_calendar_template_redirect() {
    if(!is_admin()) {
    $event_slugs = array('events', 'event');
    $request = explode('?', $_SERVER['REQUEST_URI']);
    $request = explode('/', trim($request[0],'/'));
    if(in_array($request[0], $event_slugs)) {
    add_filter('template_include', function($template) {
    $pathinfo = pathinfo($template);
    if($pathinfo['basename'] == 'no_sidebars.php') {
    add_filter('thesis_show_sidebars', function() {
    return false;
    });
    }
    return $template;
    });
    }
    }
    }

    Simply add it to Thesis’ custom_functions.php and customize the line “$event_slugs = array(‘events’, ‘event’);”, so that the array’s contents match the Event URL Slug and Single Event URL Slug that you specified in The Event Calendar’s settings.

Viewing 2 posts - 1 through 2 (of 2 total)