Skip to:
Content

BuddyPress.org

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's profile 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)

#1 @junsuijin
15 years ago

  • Keywords needs-patch added
  • Priority changed from major to minor

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?

#2 @johnjamesjacoby
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.

#3 @apeatling
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [1939]) Fixes #1061, #987

#4 @21cdb
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';

#5 @apeatling
15 years ago

I can add the home-page class, but there is no way of removing the blog-page class from the home screen, simply because that in theory is still a blog page. This is the best I can do.

#6 @apeatling
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [1943]) Fixes #1061

Note: See TracTickets for help on using tickets.