Changes between Version 1 and Version 2 of Ticket #7372, comment 1
- Timestamp:
- 12/03/2016 11:10:33 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #7372, comment 1
v1 v2 2 2 As your main concern seems to be around styling and templating, we can append a new `<body>` class like `member-type-students` in addition to the current `directory type members`. 3 3 4 Also, you can easily change the whole page template for a directory using a code like this :4 Also, you can easily change the whole page template for a directory using a code like this (code not tested): 5 5 6 6 {{{#!php 7 7 <?php 8 8 function venutius_7372_change_page_template() { 9 if ( ! empty( bp_get_current_member_type()) ) {9 if ( bp_is_members_directory() && bp_get_current_member_type() === 'students' ) ) { 10 10 add_filter( 'template_include', function ( $template ) { 11 11 $new_template = locate_template( array( 'page-templates/member-type-students.php' ) );