• websherpa

    (@websherpa)


    [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: https://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.)

Viewing 11 replies - 1 through 11 (of 11 total)
  • jamblo

    (@jamblo)

    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”)

    I’m also having trouble with this. I need to be able to edit both single.php and events/single.php, but the latter overwrites the listing for the former in my Appearance Editor.

    Please advise.

    Shane Pearlman

    (@shanepearlman)

    These are not page templates. They only function as part of the rewrite rules for the events category loop and a post within the events category.

    jamblo

    (@jamblo)

    These are not page templates. They only function as part of the rewrite rules for the events category loop and a post within the events category.

    They might not be, but WordPress interprets them as templates and following the plugin instructions leaves you unable to edit your original single.php file – a problem that needs a solution, I’d say.

    sdhunt

    (@sdhunt)

    I’ve run into the same quandary. The Events Calendar single.php replaces my theme single.php file in the WordPress theme editor. I can go in through another route to edit my theme single.php file but that is a pain.
    Does anyone have advice?

    Shane Pearlman

    (@shanepearlman)

    The theme editor. Forgot about that. Interesting issue. I don’t see why it would do that as it is in a sub folder.

    argraff

    (@argraff)

    I thought I was going crazy. Thank you for the clue as to why things were wonky on my site! A fix on this would be appreciated greatly.

    All you have to do (not that this is a fix as such, but a work around), is remove /events/ from the URL when your viewing SINGLE.PHP and reload.

    Hi
    I am having a similar problem. I am trying to drag a widget (calendar) across to the right and load it to a page. I can drop it on the Home Page but I want it on another one of my web site pages. Aside from Home Page the other options I am faced with are Multiple Post, Single Post, Pages and Pages Pages. But I can’t seem to identify the page I want the calendar to appear on. Please help.

    @inthegrove: Please post a new topic.

    Thank you esmi but please tell me how I do that before I go nuts trying to find any thing that looks like “Post New Topic”

    Go to the How-To & Troubleshooting forum and scroll down to the New Topic form at the bottom of the page.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: The Events Calendar] Problem Installing Templates in subdirectory of theme’ is closed to new replies.