[buddypress-trac] [BuddyPress] #4639: Add template hierarchy support

buddypress-trac noreply at wordpress.org
Thu Nov 1 07:15:30 UTC 2012


#4639: Add template hierarchy support
-------------------------+------------------------------
 Reporter:  DJPaul       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Theme        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by r-a-y):

 Nice first patch, Paul!

 My patch follows a little closer to how bbPress does things
 [http://buddypress.org/community/groups/creating-extending/forum/topic
 /specifying-the-surrounding-page-template-in-1-7-to-allow-different-
 templates-for-bp-content/?topic_page=2&num=15#post-142315 as I outlined
 here].

 It works with the `'bp_add_template_locations'` filter so you can do
 things like this:

 /wp-
 content/themes/twentytwelve/buddypress/members/single/home-{user_id}.php
 /wp-
 content/themes/twentytwelve/community/members/single/home-{user_id}.php
 /wp-content/themes/twentytwelve/members/single/home-{user_id}.php

 The attached patch only works for the users component as an example.  You
 can also do /members/single/home-{username}.php as well.  And Roger, if
 you use one of these templates, it will become the outer template.

 Let me know what you guys think.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4639#comment:5>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list