[buddypress-trac] [BuddyPress Trac] #7922: bp_get_template_part() does not allow movement of /buddypress/ folder

buddypress-trac noreply at wordpress.org
Tue Jul 10 21:08:16 UTC 2018


#7922: bp_get_template_part() does not allow movement of /buddypress/ folder
-----------------------------+-----------------------------
 Reporter:  theZman          |      Owner:  (none)
     Type:  feature request  |     Status:  assigned
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Core             |    Version:  3.0.0
 Severity:  trivial          |   Keywords:  needs-patch
-----------------------------+-----------------------------
 **Problem:**
 can not move the /buddypress/ directory into any other folders within the
 theme.

 **Proposed/requested solution:**
 Please define a constant that can be used to define the buddypress
 template file locations to allow moving the buddypress template files into
 more convenient locations
 {{{#!php
 //this might be added to functions.php
 define( 'BUDDYPRESS_THEME_ROOT_DIR', 'integrations/buddypress');
 //beautiful...
 define( 'BUDDYPRESS_THEME_ROOT_DIR', 'any/folder/name'); // conveniant
 define( 'BUDDYPRESS_THEME_ROOT_DIR', 'multisite/buddypress/custom');
 //dynamic
 define( 'BUDDYPRESS_THEME_ROOT_DIR', 'multisite/buddypress/green_theme');
 //elegant
 define( 'BUDDYPRESS_THEME_ROOT_DIR', 'multisite/buddypress/blue_theme');
 //effective
 }}}

 This would open up a wide verity of functionality and make for a more
 elegant folder structure when a theme developer wants to place all
 integrations into 1 folder.


 **To elaborate - please consider the following-**
 Folder Structure:
 wp-content/themes/my-theme/buddypress/members/single/activity
 {{{#!php
 bp_get_template_part( 'members/single/activity' ); // Works as expected,
 of course
 }}}

 **However, this does not work**
 Folder Structure:
 wp-content/themes/my-theme/integrations/buddypress/members/single/activity
 {{{#!php
 bp_get_template_part( 'integrations/buddypress/members/single/activity' );
 // does not work
 // it looks of course for 'buddypress/integrations/buddypress/'
 }}}


 Thank you for your consideration in this matter.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7922>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list