Skip to:
Content

bbPress.org

Opened 7 years ago

Last modified 7 years ago

#3105 new enhancement

Move titles out of display_forums() and into templates for easier styling

Reported by: rgilman's profile rgilman Owned by: mercime's profile mercime
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.5.12
Component: Extend - BuddyPress Keywords: needs-patch 2nd-opinion
Cc: contato@…

Description

I’m working on simplifying the UI of a Commmons In A Box site, which means I’m working with both BuddyPress and bbPress. While working on the group/forum page, I found that the forum title is hard coded (as a simple h3 with no other selectors) in display_forums() (see wp-content/plugins/bbpress/includes/extend/buddypress/groups.php at line 767). This is just before the content-single-forum template call.

In my case I wanted to remove that title and was able to do so with

#bbpress-forums > h3 {
    display: none;
}

But that feels like a workaround and it was a long hunt to find this bit of the UI in what I would think of as core code.

In exploring around display_forums(), it looks like this a common pattern: The appropriate title is hard coded into display_forums() and then the rest of the displayed content is handled via a template call.

My request/suggestion is that all of these titles be moved from display_forums() and into their associated templates where they can be customized through the normal child theme process.

I'm happy to offer patches if that would be helpful.

Change History (3)

#1 @espellcaste
7 years ago

  • Cc contato@… added

The forum template is used in other places as well, so maybe there is a reason why this is not included in the template. But let's see if core devs pitch in to share their opinion about it.

#2 @johnjamesjacoby
7 years ago

  • Keywords needs-patch 2nd-opinion added
  • Milestone changed from Awaiting Review to 2.7
  • Owner set to mercime

Related to #2968.

#3 @johnjamesjacoby
7 years ago

In 6488:

BuddyPress: Only wrap titles in h2 tags if they are not empty.

Allows easier overriding if titles are not desired at all.

See #3105.

Note: See TracTickets for help on using tickets.