[wp-trac] [WordPress Trac] #18118: Append page slug to body_class function

WordPress Trac noreply at wordpress.org
Fri Aug 16 00:28:00 UTC 2013


#18118: Append page slug to body_class function
-----------------------------+------------------------------
 Reporter:  andrewsvg        |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Themes           |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------------------

Comment (by buffler):

 There may be good reason not to worry about this... but I thought I'd just
 chime in to +1 - I've taken to adding a filter on body_class to achieve
 this same thing.

 True, ID classes can be used just the same - but not having to add
 comments anywhere you might use them feels nicer to me. ".page.about-us"
 is sort of self-documenting, whereas ".page-id-###" should probably be
 accompanied by a comment explaining whiche page it is anywhere it's
 used...

--
Ticket URL: <http://core.trac.wordpress.org/ticket/18118#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list