• I’m running into a curious issue here. I was all ready to blame some kind of interactive problem with my theme, but if I switch themes around, the problem persists, so here goes.

    According to the documentation, I should be able to modify plugins/events-organiser/templates/single-event.php to customize the layout of the individual event post. As directed, I placed this within the theme’s template directory etc etc in case of updates etc etc. However, all changes I made to this file never showed up in the single event display.

    So I renamed plugins/event-organiser/templates/single-event.php to something else to prevent it being used. No changes. I edited the file directly just to see if anything changed. Nothing changes. With some additional debugging, I found that no matter what, the theme’s single.php file is being called to display the single event. And as I said, I originally thought the theme was at fault, but this issue persists if I switch themes around.

    (The interesting thing is that event-meta-event-single.php *does* affect the output if I modify it, so it’s getting called in correctly, but it’s a function hook rather than a template if I understand your comments correctly — and it is NOT getting called from the single-event.php template since I actually commented it out while debugging this, only to see the meta info still appear…)

    I’m not sure exactly where you add the filter for the alternate template (grepping through your php files for any call to filter, template, etc didn’t come up with anything obvious, although this isn’t a detailed examination of course).

    Maybe there’s a setting I need (although I tried checking and unchecking the template question in Settings->Event Organiser to no avail.

    It’s also possible I’m getting my “category” confused — the event slug seems to be <site>/wordpress/events/event/<postname>, although when editing the events, I have an event category of lectures. I have tried single-event.php, single-events.php, and even single-lectures.php to no effect.

    (I checked this thread
    http://ww.wp.xz.cn/support/topic/custom-single-event-pages-by-category?replies=9
    But it seems to have nothing to do with my question despite the promising title.)

    Thanks,
    Cindy

    https://ww.wp.xz.cn/plugins/event-organiser/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    Hi Cindy,

    According to the documentation, I should be able to modify plugins/events-organiser/templates/single-event.php to customize the layout of the individual event post. As directed, I placed this within the theme’s template directory etc etc

    This is correct – if you copy single-event.php into the root of the active theme, Event Organiser should use that template.

    In most cases if the appropriate template isn’t found, the plug-in provided one is used. The exception to this is single-event.php: if this is not found, single.php is used and the event-meta-event-single.php template is used to insert content just before the main event content.

    Additionally, disabling the plug-in template handling (in Settings > Event Organiser > General) will mean that the plug-in will not in anyway determine which templates are used. If after disabling this your theme is still not using your single-event.php this suggests a plug-in/theme is also changing the template selection.

    Given that you mention this problem isn’t unique to the theme, that suggests it’s maybe a plug-in. If you temporarily disable the other plug-ins, you can determine if this is the case (and if so, which plug-in). If you can identify a particular plug-in then I’d be happy to investigate further to see what the actual cause is.

    Thread Starter beg65

    (@beg65)

    (This isn’t yet resolved on my end, but I’m travelling, so I will be getting back to this in a few weeks, just to let you know. Thanks!)

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

The topic ‘trying to customize single-event.php’ is closed to new replies.