Support

Home Forums Event Espresso Premium Is it possible to override the Recurring Dropdown Template?

Is it possible to override the Recurring Dropdown Template?

Posted: January 5, 2015 at 10:36 am

Viewing 9 reply threads


Anthony Snippe

January 5, 2015 at 10:36 am

We have the custom Templates module installed and I have tried everything that I have read on creating a custom temple to override this one but nothing seems to work. Is it overridable?

Kevin


Lorenzo Orlando Caum

  • Support Staff

January 5, 2015 at 10:52 am

Hi Kevin,

These are the steps that we recommend:

https://eventespresso.com/wiki/custom-template-add-on/#cel_custom

Did you relocate a copy of the existing template as mentioned in the steps in the link above?


Lorenzo


Anthony Snippe

January 7, 2015 at 9:47 am

Hi there,

Yes I followed the instructions to create the folder and filename inside the theme directory, copied the contents of the index.php file from the Espresso Template Recurring Dropdown plugin and then change the template_name in the shortcode.

I get the error “he custom template custom-recurring-dropdown can not be found”


Lorenzo Orlando Caum

  • Support Staff

January 7, 2015 at 2:21 pm

Hi, could you relocate it here:

/wp-content/uploads/espresso/templates/

Also, could you share the exact shortcode that is in use?


Lorenzo


Anthony Snippe

January 7, 2015 at 8:15 pm

I have also tried it in /wp-content/uploads/espresso/templates/custom-recurring-dropdown/custom-recurring-dropdown.php with this shortcode:
[EVENT_CUSTOM_VIEW event_category_id=10 template_name=”custom-recurring-dropdown” order_by=”event_name”]

Same error

It is being done through a PHP do_shortcode() but that shouldn’t make a difference.


Josh

  • Support Staff

January 8, 2015 at 11:24 am

Hi Anthony,

While it’s possible to override the Recurring Dropdown template, there are additional steps to take because unlike the events table template, the Recurring dropdown template is contained within a function. Along with that, there is a script and stylesheet that are loaded from the main function.

So your options are
Option 1: You make a copy of the entire REM template plugin, rename the copy to something unique, and deactivate the original.
Option 2:
Step 1) Copy the contents of the REM template plugin into /wp-content/uploads/espresso/templates/custom-recurring-dropdown
Step 2) Open up the index.php file and change the first add_action to:
add_action('action_hook_espresso_custom_template_custom-recurring-dropdown','custom_espresso_recurring_dropdown', 10, 1);
Step 3) Change the callback function name to:
custom_espresso_recurring_dropdown
Step 4) Change the file URL for the jQuery dropdown script:
wp_register_script( 'jquery_dropdown', EVENT_ESPRESSO_UPLOAD_URL . 'templates/custom-recurring-dropdown/js/jquery.dropdown.js', array('jquery'), '0.1', TRUE );
Step 5) Change the file URL for the jQuery dropdown stylesheet:
wp_register_style( 'espresso_recurring_dropdown_stylesheet', EVENT_ESPRESSO_UPLOAD_URL . 'templates/custom-recurring-dropdown/css/jquery.dropdown.css');
Step 6) Delete the code that hooks into PUE updates, ie the espresso_template_recurring_dropdown_load_pue_update function.


Tony

  • Support Staff

January 8, 2015 at 11:29 am

Hi Anthony,

Loading custom templates can be done by placing the template file within

/wp-content/uploads/espresso/templates/{template_name}/template.php

So in this case as you are using the recurring-dropdown template you’ll need to place the template file within:

/wp-content/uploads/espresso/templates/recurring-dropdown/template.php

This will override the default template template if you use the standard shortcode:

[EVENT_CUSTOM_VIEW event_category_id=10 template_name=”recurring-dropdown” order_by=”event_name”]


Tony

  • Support Staff

January 8, 2015 at 1:25 pm

To note the difference between the 2 replies above, the method @Josh provided will also work but is basically a complete copy of recurring-dropdown which is then customized.

The method I provided will allow you to simply use a custom template.php file whist loading all of the original CSS and JS files that the default template uses.

Which is best to use, depends on what it is you are are changing.


Anthony Snippe

January 9, 2015 at 6:13 am

Thank you – the simplest was just copying the full plugin and renaming it.


Tony

  • Support Staff

January 9, 2015 at 6:48 am

@Josh pointed out that the method I mentioned wouldn’t actually work with the current release version of the template. You needed the latest development version for this, which we have just released.

This update to the Recurring Events Template includes Multi Event Registration (MER) support (http://take.ms/8y6vR) using the shortcode parameter show_mer_icons=true.

You may want to take a look at this version, however automatic updates for this template will not work on this version, so if you would like use this version you will need to manually update.

This version works slightly different in that the HTML output is all within a ‘template.php’ file that can be modified (again the other above method will also work with this version). If you are happy with the current version there is no need to update, I just wanted to let you know it had been released.

Viewing 9 reply threads

The support post ‘Is it possible to override the Recurring Dropdown Template?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso