[buddypress-trac] [BuddyPress Trac] #6065: Add support for WordPress Page templates
buddypress-trac
noreply at wordpress.org
Sat Dec 13 14:33:28 UTC 2014
#6065: Add support for WordPress Page templates
------------------------------------+------------------------------
Reporter: DJPaul | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Theme / Template Parts | Version:
Severity: normal | Resolution:
Keywords: has-patch |
------------------------------------+------------------------------
Comment (by hnla):
This isn't necessarily a proper approach but testing quickly reworked
things to:
{{{
if ( $template_file ) :
$primary_templates = array();
else:
$primary_templates = array(
'plugin-buddypress.php',
'buddypress.php',
'community.php',
'generic.php',
);
endif;
}}}
get_page_template() returns an empty string if the selection is the WP
default template.
In my test I have page full width selected for the bp pages under 2014 I
also have /buddypress/buddypress.php setup resulting in a clash where WP
adds the template name to the body class. I've then simply checked if
'get_page_template_slug' returns a value and set our $primary_templates
array to empty (not suggesting that's a correct approach ) I now display
the named page.php template until I deselect the template and let BP run
the full template set and my buddypress.php is found and used.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6065#comment:8>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list