Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BuddyPress Links 0.2-RC1 now available


Mariusooms
Participant

@mariusooms

MrMaz, the bp-groupblog plugin uses an unorthodox technique. It does exactly what you mention. It works from the plugin folder, but if the theme folder gets moved to the ACTIVE theme folder it will prioritize.

It does something like the following for template files:

<?php

function groupblog_screen_blog_content() {

global $bp, $wp;

if ( file_exists( STYLESHEETPATH . '/groupblog/blog.php' ) )

load_template( STYLESHEETPATH . '/groupblog/blog.php' );

else

load_template( WP_PLUGIN_DIR . '/bp-groupblog/groupblog/blog.php' );

}

?>

I’m using STYLESHEETPATH since that finds the file for the active theme. I prefer to stuff theme files in the active theme, just in case people may or may not a parent/child theme.

Hope this can help. I hear good things about your plugin, can’t wait to try it.

Skip to toolbar