@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.
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!!!
@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?
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!
@Valuser
Interesting! That may be the key to solving it.
What line of code did you add?
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
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
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.
@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?
I would like to do the same thing on last version buddypress.
I would like two members directory without member type
Did anyone find an answer to this?
Trying to do the same thing.
You can do that with PB PROFILE SEARCH PLUGIN Plugin url
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