[Plugin: The Events Calendar] Problem Installing Templates in subdirectory of theme
[Plugin: The Events Calendar]
I am attempting an installation of The Events Calendar in this work in progress: develop.posseproject.ca
I am a WordPress beginner in a sense (and have had other programmers work on much of the functionality) but for lack of resoruces I need to complete this integration myself. I don’t yet understand all concepts in WordPress, and the one that stumps me is how WordPress’s Add New Page Dashboard integrate Page Templates that exist in subfolders of the Parent Theme?
I want to place calendar elements/template styles in various Pages, like here: http://develop.posseproject.ca/get-involved/human-rights-events (this is basically the Theme’s header and footer templates loading within the unmodified grid calendar template (i.e. it doesn’t fit properly yet – that comes later).
Now when I move The Events Calendar sample templates to their own folder in my own theme:
/wp-content/themes/posse/events/ and go to Add a new page or edit an old one, these new templates do not appear in the Page Templates drop down directory.
In experimentation, if I put a COPY of the gridview.php “events” template up into the theme directory, the Page Templates drop down will find and use them (they have what I assume are the correct headers).
This code has been added by me:
<?php $disccode = "basic"; $eventscode ="events"; ?>
^ This part simply adds a custom css based on the different templates I am using for sections in the site AND adds the events.css to events templates.
<?php /** * @package WordPress * @subpackage Posse_Theme Template Name: Events Grid */
^ I assumed this code was required to get teh template to show in the Page Template dropdown in the WP Admin Page tool.
And it works, mostly.
But I have concerns 1) this is not how the instructions said to install them, 2) the sample templates wouldn’t show up in the Page Template dropdown without the appropriate “Template:” comment added and 3) the events template name “single.php” conflicts with the Theme’s default “single.php” template (so they couldn’t both exist in the theme’s root folder, and renaming the templates breaks the existing functionality in the main plugin and I don’t really want to custom code the Plugin and break the upgrade path.
(Maybe I have to read up more on the Template Hiearchy and hyphens as in “single-event.php”)
So really what I’m looking for is an explaination of how putting the /events/ folder in my theme folder was supposed to work (and ideas why its not for me)…. and any other ideas that might advance my understanding (before I start hacking away at the code in my hamfisted and niave way). 😉
Thank you for the great plugin by the way, it looks perfect for what we want it to do (which is have a central events calendar (category: Events” AND subsidiary events calendars (categories: one or more of the existing Post categories) <- it makes the calendar even more useful since I can have Posts which appear as regular blog items and feed certain content areas AND those same posts can also be defined as Calendar events and appear in the calendar formats as well. Brilliant plugin!
(Sorry for the long post.)
- The topic ‘[Plugin: The Events Calendar] Problem Installing Templates in subdirectory of theme’ is closed to new replies.