Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to display additional member directory.


  • kamarr
    Participant

    @kamarr

    How would I add additional membership directory displaying only members with a certain role. The other “main” member directory should would remain unaffected by the parameters of the “secondary” member directory.

    An example would be a main member directory listing all the members from every city in the world, while the Secondary menu would only list the members from cities located in the United States.

    I found most of @danbp postings to be extremely helpful.

    All help is greatly appreciated!

Viewing 13 replies - 1 through 13 (of 13 total)

  • kamarr
    Participant

    @kamarr

    @henrywright

    @shanebp

    Do you think I would need an outside plugin to accomplish this. or would adding some code to a few files produce a completely independent second member directory.

    Any help would be greatly appreciated.


    valuser
    Participant

    @valuser

    Try this. It MAY work.

    In your theme folder add a folder named “buddypress”.

    In that folder place another folder named “members”

    Duplicate the file /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php

    Rename this new duplicate file to say “new-york-members-loop.php” and place it in /wp-content/your-theme/buddypress/members

    Obviously you will code conditions into this file so that it only turns up members from New-York.

    (conditions and name etc to your specs)

    The file should respond to the link http://yoursite.com/new-york-members/

    The mods you mention will surely refine this if not correct!!!


    kamarr
    Participant

    @kamarr

    @Valuser

    Thank you for your response and suggestion! After following the steps and visiting the page, the website produces a 404 page not found error.

    I’ve tried creating the page with in wordpress as a new post just in case, and that produces a blank theme style page with no member directory.

    The approach seems logical. Copying the member-loop.php file, renaming it, and pasting it in wp-content/my-theme/buddypress/members is probably not far from the mark.

    I wonder what should be changed?


    valuser
    Participant

    @valuser

    Can only offer this.

    My alternative members directory is “local-” as in “local-members-loop.php”

    I also have a copy of members-loop.php in the /wp-content/your-theme/buddypress/members folder

    But that was only (at least i thought!) so that i added a line in the main directory directing users to the local directory

    mysite.com/local-members/ gets the alternative directory and mysite.com/local-members-loop.php/ produces a 404

    While i am running bp 2.5.1 and wp 4.4.2 and a lot of plugins these bp pages are in a child theme and have not been updated for a while and so may not reflect recent changes to the bp-legacy theme BUT they work!


    kamarr
    Participant

    @kamarr

    @Valuser

    Interesting! That may be the key to solving it.

    What line of code did you add?


    valuser
    Participant

    @valuser

    The two files in /wp-content/your-theme/buddypress/members – folder

    http://pastebin.com/PWS7AAps

    http://pastebin.com/b3j6NGwz

    (however – bespoke multi-network bits & pieces like “genre” not really relevant to the instant query)

    Cheers


    kamarr
    Participant

    @kamarr

    Thanks again.

    I’ve copied the files you provided to the files in the /wp-content/my-theme/buddypress/members – folder. To test it properly I’ve even named the target file local-members-loop.php. However, the page still produces a 404 page not found error.

    The site is running with WordPress 4.4.2 and Buddypress 2.5.2.

    The idea is sound, I wonder what the issue may be.


    @Valuser


    @henrywright


    @shanebp


    @danbp


    shanebp
    Moderator

    @shanebp

    Please don’t call out people individually.

    Create a Page – not a Post.

    Create a template and assign it to that Page.
    https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/#creating-custom-page-templates-for-global-use

    Put your members-loop code in that page.
    Also include get_header() and get_footer() calls.


    kamarr
    Participant

    @kamarr

    @shanebp

    Thank you for your assistance!

    The page is now showing a member directory.

    The only things missing now are the member role navigation, filter and search function produced by the index.php file in the plugins/buddypress/bp-templates/bp-legacy/buddypress/members-folder. In addition to that it seems the buddypress css is not rendering as well.

    How could I add those functions to the page-custom-members-loop.php?

    *What is the proper etiquette for using the @ function?


    kechweb
    Participant

    @kechweb

    I would like to do the same thing on last version buddypress.
    I would like two members directory without member type


    shonty
    Participant

    @shonty

    Did anyone find an answer to this?

    Trying to do the same thing.


    kechweb
    Participant

    @kechweb

    You can do that with PB PROFILE SEARCH PLUGIN Plugin url


    Jake Ward
    Participant

    @jakeward

    Hi,

    Thanks for your post! I’ve found how to make a search form with the plugin but not a new directory, could you help please?

    Thanks
    Jake

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Skip to toolbar