Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 11 years ago

Last modified 8 years ago

#3435 closed enhancement (wontfix)

Add CSS class to BP Component Page Titles

Reported by: mercime's profile mercime Owned by: karmatosed's profile karmatosed
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Templates Keywords:
Cc: mercijavier@…

Description

This is a proposal to add a class for the page titles of BP component pages:

<h2 class="bp-pagetitle"> ... </h2> 
<h3 class="bp-pagetitle"> ... </h3>

At present, one could only style the page titles of BP component pages through following selectors

body.directory h3,
body.create h3,
body.create-blog h2,
body.activate h3,
body.activate h2,
body.register h2 {
     background-color: #000000;
    color: #ffffff;
} 

However, using above method will affect all other <h2> and <h3> tags within pages with such body classes.

Patch attach for consideration.

Attachments (3)

3435-01.patch (7.0 KB) - added by mercime 13 years ago.
3435-02.patch (7.0 KB) - added by mercime 13 years ago.
3435-02b.patch (7.0 KB) - added by mercime 13 years ago.
h2 and h3 page titles with CSS class "pagetitle"

Download all attachments as: .zip

Change History (13)

@mercime
13 years ago

#1 @r-a-y
13 years ago

  • Component changed from Core to Theme
  • Summary changed from Add class to BP Component Page Titles to Add CSS class to BP Component Page Titles

#2 @mercime
13 years ago

  • Cc mercijavier@… added

#3 @DJPaul
13 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to Future Release

DTheme adds .pagetitle and .posttitle to the standard WordPress templates. I don't want to introduce a new selector just for this. I'm more concerned because DTheme uses a mixture of <h2> and <h3> for its page titles on different pages. If the patch could be standardise the page titles on all the BuddyPress templates to <h2> elements (or <h3>, if you feel that is appropriate), we can also add the .pagetitle to the BP component page templates.

@mercime
13 years ago

#4 @mercime
13 years ago

Replying to DJPaul:

DTheme adds .pagetitle and .posttitle to the standard WordPress templates.

Yes, this is great because one can already separate the styling for page titles in Posts and Pages still have <h2> tags within content of either with a different style.

I don't want to introduce a new selector just for this. I'm more concerned because DTheme uses a mixture of <h2> and <h3> for its page titles on different pages. If the patch could be standardise the page titles on all the BuddyPress templates to <h2> elements (or <h3>, if you feel that is appropriate), we can also add the .pagetitle to the BP component page templates.

I'd go even further and say that all page titles should be ideally tagged <h1> and the blog title <h1> only in is_front_page and have it <h2> in all the pages as we're dealing with XHTML doctype :-)

But going back to the available choices, <h2> and <h3>, I would go with <h2>. Patch attached has changed <h2> and <h3> tittle tags to <h2 class="pagetitle">

#5 @mercime
13 years ago

  • Keywords has-patch added

As an afterthought, there was a rationale for using <h3> tags for page titles which I can't quite recall. Attached is another patch, just in case :-)

@mercime
13 years ago

h2 and h3 page titles with CSS class "pagetitle"

#6 @DJPaul
12 years ago

  • Keywords needs-patch has-patch removed
  • Owner set to karmatosed
  • Status changed from new to assigned

Tammie -- want to check this out for the theme compat (not BP-Default) templates in some of your 1.8 stuff, maybe #4953? If not or the issues gone, we should close the ticket as we aren't going to make substantial changes to BP-Default anymore.

#7 @mercime
11 years ago

Should close this ticket already since this is not relevant for Theme Compat where template tags/markups for Page/Post titles are handled by the WordPress theme used.

#8 @r-a-y
11 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

Cool, thanks for the update, mercime!

#9 @r-a-y
11 years ago

  • Milestone Future Release deleted

#10 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.