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

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 14 21:52:03 UTC 2011


#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           |   Keywords:
-----------------------------+-----------------------------
 I actually do this already on all of my sites, and thought this would be
 an obvious, amazing thing to add to the body_class function. Pretty much
 what you'd expect; the page-slug gets appended to the body_class, allowing
 for page-specific styling.

 '''<?php body_class($post->post_name . ' '); ?>'''

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


More information about the wp-trac mailing list