Support » Plugins » [Plugin: The Events Calendar] Parent/child theme issues in Buddypress

  • Hi everybody! Here is an interesting problem for you programming experts: I’m setting up a Buddypress community that makes use of the Events Calendar (which is AWESOME, by the way). I just want to modify the original Events Calendar themes to suit our needs, but can’t get the Events Calendar to recognize my customized themes over the default ones.

    This might have something to do with the way Buddypress wants you to handle custom themes. Basically I followed the Buddypress instructions and made my theme a child of the default Buddypress theme. Then, after I installed the Events Calendar, I put a copy of the Events Calendar themes in an /events/ subfolder in my child theme directory, so I could work on them. But the Events Calendar seems to want to look in the PARENT Buddypress default theme folder rather than my CHILD theme for the modified ones.

    I did read a very similar thread on this forum about how to modify Events Calendar themes without touching the original ones (, but I wasn’t able to glean a solution from that.

    I wonder if this has something to do with the special way in which Buddypress handles themes? BP themes are stored in plugins/buddypress/bp-themes/bp-default, whereas my child theme is placed (as instructed) in the wp-content/themes folder. Either that, or this is a more generalizable problem that applies to all themes with a parent/child relationship?

    I also thought of just putting the /events/ folder in the parent BP theme directory but that isn’t ideal from a code standpoint because what if I update BP in the future? It could wipe out my custom theming work.

    Has anyone else had this issue? Any ideas?

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    It’s probably more to do with the parent/child theme relationship.

    FYI, the only BP theme that goes in the plugin’s theme directory is the default theme. 🙂 (mostly for others reading along)



    Volunteer Moderator

    So you copied the /events/ folder from the plugin into your child theme’s folder, right? Did you edit the gridview.php, list.php, and single.php within events folder so that the HTML markup and required template tags would be the same as your child theme’s? Also, if you are using a custom/complicated BP child theme (like the one based on one of the WP theme frameworks) you would need to be extra vigilant on the call to header, sidebar and footer in those three files,

    Furthermore, I would recommend asking this at BP forums –

    edit- what Andrea_R said too 🙂

    Thanks for the replies!

    @mercime, yes I did copy the events folder into the child theme folder and edited them accordingly. But the problem isn’t that I coded the customized events templates in the child theme wrong, rather that they’re not getting recognized AT ALL by The Events Calendar plugin.

    To test this, I looked at the original event plugin template files and noticed that they were using the TEMPLATE_PATH variable. I echoed this to see what it was and, sure enough, Events Calendar thinks TEMPLATE_PATH is the root of the parent theme, not the child theme I created.


    For the time being, I just made a backup of the plugin’s theme files and edited those directly. =( Hopefully a better solution will arise.



    Volunteer Moderator

    tinabeans, some solutions:

    1. use STYLESHEETPATH ( for child themes) as TEMPLATE_PATH gets wonky in BP child themes.
    … if that doesn’t work then

    2. Try the locate_template function instead.
    <?php locate_template( array( ’mypage-template.php’ ), true ) ?> will look through the child theme’s folder before going to the parent theme’s folder.
    …if that doesn’t work then

    3. Last resort would be to use ABSPATH – relative to root folder
    <?php include(ABSPATH."/wp-content/themes/childtheme/navigation.php");?>

    Shane Pearlman


    Modern Tribe

    If Mercime’s solution didn’t do it for you, the 1.6 release of the plugin might help. We have finished upgrades to support child themes (although a fair bit of testing is needed). No eta yet, but if you are brave and daring I can pass you a copy of trunk. Caveat emptor.


    For updates, release information and tips about our open source plugins, follow us on twitter @justlikeair.

    @shane Thanks for responding! I just did a find-and-replace on the main plugin PHP file and replaced all instances of TEMPLATE_PATH with STYLESHEETPATH. This worked! So I am all set. I don’t want to fix it if it ain’t broken so I’ll pass on using the trunk for now. =)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: The Events Calendar] Parent/child theme issues in Buddypress’ is closed to new replies.