#7372 closed enhancement (no action required)
Add page for Member Type directory listing
Reported by: | Venutius | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3.0 |
Component: | Members | Keywords: | dev-feedback |
Cc: |
Description
I've been playing with member types and it occurs to be that the directory pages that are created for each member type should create/use their own page in the same way that other BuddyPress components use pages.
That way each component page can be dealt with in similar ways from the perspective of page styling.
Change History (2)
#1
@
8 years ago
- Keywords dev-feedback added
- Milestone changed from Awaiting Review to Under Consideration
- Version set to 2.3.0
#2
@
8 years ago
- Milestone Under Consideration deleted
- Resolution set to invalid
- Status changed from new to closed
Hi @Venutius - thanks very much for your suggestion. I hope the code @slaFFik helped you achieve this on your site.
Generally speaking, the Page-to-BuddyPress-component mapping dates back to version 1.6, which I think -- with hindsight -- all involved then, now regret making that particular architectural decision. Sooner or later we will migrate to using something like rewrite rules, and these pages and their mappings will disappear. I don't believe it's worth adding more features around the page mapping logic at this time.
I'm not sure we will go this route - give for each member type an own WordPress page.
As your main concern seems to be around styling and templating, we can append a new
<body>
class likemember-type-students
in addition to the currentdirectory type members
.Also, you can easily change the whole page template for a directory using a code like this (code not tested):
You can also redefine only particular BuddyPress part of the member type directory using this:
https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/#member-directory-page