Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add a few more members-directory pages?


  • landwire
    Participant

    @landwire

    Hi there,

    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.

    Thanks,
    Sascha

Viewing 26 replies (of 26 total)

  • damienoneill2001
    Participant

    @damienoneill2001

    Hey guys,

    Just want to say that this helped me out with my project a lot.

    Setting up the different Members Directories as new templates was such a simple and obvious idea! It was exactly what I needed!

    Thanks!

    Damien

Viewing 26 replies (of 26 total)
  • The topic ‘How to add a few more members-directory pages?’ is closed to new replies.
Skip to toolbar