I’ve been trying to create a new template for my event listings but it keeps saying it can’t find it. I’ve put in in the plugin folder and the theme folder incase I’m missing something and also in its own folder within those directories. On my page I’ve got:
[EVENT_CUSTOM_VIEW template_name=”grid-view”]
Where should I put the grid-view template exactly as it’s not being found?
yes i did (well i thought i did but it shows that it can’t find the template grid_view.) … incase i’ve not read it correctly where should the grid-view.php actually be found?
thanks!
If you’re creating a template from scratch, there’s a few extra steps that I’ll outline below. But first, the main custom view plugin checks for the template in folder_name/index.php.
So in your theme (ideally a child theme) you’ll add a new folder and name it grid-view. Then add your template file to this new folder and name it index.php.
In index.php you’ll need to include an add_action with a callback to your template’s main function. For grid-view this will look like:
add_action('action_hook_espresso_custom_template_grid-view','my_custom_template_grid_view');
function my_custom_template_grid_view(){
// template code and stuff goes here
}
Then you can load this template via shortcode on a page:
The support post ‘Create a new template for my event listing’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.