#3435 closed enhancement (wontfix)
Add CSS class to BP Component Page Titles
Reported by: |
|
Owned by: |
|
---|---|---|---|
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)
Change History (13)
#1
@
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
#3
@
13 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from Awaiting Review to Future Release
#4
@
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
@
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 :-)
#6
@
11 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
@
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.
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.