[wp-trac] [WordPress Trac] #23470: Convert slash to dash and make body class for page templates look better

WordPress Trac noreply at wordpress.org
Thu Mar 7 18:33:04 UTC 2013


#23470: Convert slash to dash and make body class for page templates look better
--------------------------+------------------------------
 Reporter:  Caspie        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Template      |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by donutz):

 * cc: donutz (added)


Comment:

 I would like to make a case for fixing it.

 First, something like page-template-page-templatesfront-page-php looks
 quite horrible, not to say buggy or erratic. I wouldn't use such a
 selector in my stylesheet :)

 Second, moving templates to a sub-folder (and thus being forced to reapply
 them) breaks things as well (css), one expects to have access to the same
 body class selector, template located in sub-folder or not.

 Third, it could be useful to have the sub-folder name as a separate body
 class, so one could group a bunch of templates and style them all in one
 go.

 I attached a diff file with a possible solution.

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


More information about the wp-trac mailing list