How to add a few more members-directory pages?
I am sure it’s easy enough, but I just seem to have a blockage.
I want to show a few more members loops depending on a users role. I have the functionality worked out. I use this in the members-loop for now:
<?php $included_users = implode(',',get_users('role=office&fields=ID')); ?> <?php d($included_users); ?> <?php //if ( bp_has_members( 'include=' . $included_users ) ) : ?> <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) .'&include=' .$included_users ) ) : ?> <?php //if ( bp_has_members( bp_ajax_querystring( 'members' ).'&type=alphabetical' ) ) : ?>
But I would like to create another page for this loop, so that the original members-loop.php is untouched. Basically creating an offices-loop.php and calling it from offices-index.php with this code in it:
<div id="members-dir-list" class="members dir-list"> <?php bp_get_template_part( 'members/offices/office-loop' ); ?> </div><!-- #members-dir-list -->
I assume that would be the right approach? BUT how do I load offices-index.php? I created a new page called offices, but I just do not know how to get it to load offices-index.php.
The topic ‘How to add a few more members-directory pages?’ is closed to new replies.