Opened 15 years ago
Closed 15 years ago
#1061 closed defect (bug) (fixed)
body class for homepage and blog-page are the same
Reported by: | 21cdb | Owned by: | |
---|---|---|---|
Milestone: | 1.1 | Priority: | minor |
Severity: | Version: | ||
Component: | Keywords: | needs-patch | |
Cc: |
Description
The body class on the homepage is body class="blog-page home-page home blog logged-in" It is the same for the blog page. It would be great if we could remove the class="blog" from the homepage and and the class="home" from the blog-page. In so doing it would be much easier to come up with different css styles.
Change History (6)
#2
@
15 years ago
Would it make sense to just apply the $bp->current_component as a class? I know I mentioned it in IRC but figured I'd document it here just in case.
#4
@
15 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I reopened the ticket, because the body class on homepage and blog-page is still the same. It is now "blog-page".
Could it maybe help to add again line 1595 and 1596 from bp-core/bp-core-templatetags.php?
1595 if ( bp_is_blog_page() && is_home() )
1596 $bp_classes[] = 'home-page';
this ticket is somewhat related to https://trac.buddypress.org/ticket/987#comment:3 that i reopened some time ago, and could actually be resolved outside of core once that patch gets committed. Anyway, if is_front_page wouldn't work for this (inside the bp_get_the_body_class template tag, maybe the same check that bp-sn-parent does in functions.php should be employed?