Skip to:
Content

BuddyPress.org

Changes between Version 1 and Version 2 of Ticket #7372, comment 1


Ignore:
Timestamp:
12/03/2016 11:10:33 AM (10 years ago)
Author:
slaFFik
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7372, comment 1

    v1 v2  
    22As 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`.
    33
    4 Also, you can easily change the whole page template for a directory using a code like this:
     4Also, you can easily change the whole page template for a directory using a code like this (code not tested):
    55
    66{{{#!php
    77<?php
    88function 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' ) ) {
    1010        add_filter( 'template_include', function ( $template ) {
    1111            $new_template = locate_template( array( 'page-templates/member-type-students.php' ) );