• Resolved shirazk

    (@shirazk)


    Hello,

    I’m using the built-in eventbrite events and would like to customize the templates for the events listing page and single event page.

    I noticed as of version 1.5.0 this should be possible:
    * ADDED: Template Overrides from Theme

    However I don’t see anything in the documentation on how to do this.

    Can you please help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Xylus Themes

    (@xylus)

    Hi @shirazk ,

    Overriding plugin template is good option if you understand how to customize it. It diffuclt to explain in support if you are not familiar with it. Below is guideline for same.

    Overriding plugin file is fine from our side. Suppose, you need to edit one event detail layout,
    -> Go to wp-content/plugins/import-eventbrite/templates/layouts/
    -> Copy file.
    -> Go to wp-content/themes/your-choosen-theme/ and create a folder import-eventbrite and inside this folder create folder layouts.
    -> Paste the copied file here and edit to your requirements. This file will override the plugin’s file.

    You go ahead only if you are understand customization or please take help of your developer.

    @xylus

    I’m using v1.5.6 and need to add a sidebar to the single-event-post views. I see part of the path you noted above: wp-content/plugins/import-eventbrite/templates/ – but it does not have a layout folder.

    I tried adding to my theme anyway by using the file structure in place – with no luck. So I removed the folders and file. As it turns out, the post view isn’t even using templates from the plugin! When I use “What the File”, it looks like the event view is using single.php and several include files – none of them driven by the plugin. It’s relying on theme files instead.

    Am I missing something?

    @xylus Can you clarify those instructions? I’ve tried both /mytheme/import-eventbrite/layouts/iee-event-meta.php (based on your instructions) and /mytheme/import-eventbrite-events/templates/iee-event-meta.php (based on the plugin structure) and neither works.

    Thanks!

    I had some luck with creating a custom post template, i.e. single-eventbrite_events.php.

    By referring to the code I found this documentation:

    
    * This is the load order:
    *
    *      yourtheme       /   $template_path  /   $template_name
    *      yourtheme       /   $template_name
    *      $default_path   /   $template_name
    

    For me the override worked that way:

    <my theme folder>/import-eventbrite-events/iee-archive-content.php
    and
    <my theme folder>/import-eventbrite-events/iee-event-meta.php

    For people having problems with this, first make sure your plugin has version 1.5.0 or above, because this override functionality only got introduced in that version.

    • This reply was modified 5 years, 4 months ago by thorgallecr.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Overriding Plugin Templates’ is closed to new replies.