[wp-trac] [WordPress Trac] #11331: get_body_class() does not include page-{slug}-php

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 28 01:51:34 UTC 2010


#11331: get_body_class() does not include page-{slug}-php
-----------------------------------+----------------------------------------
 Reporter:  westonruter            |        Owner:         
     Type:  enhancement            |       Status:  closed 
 Priority:  low                    |    Milestone:         
Component:  General                |      Version:  3.0    
 Severity:  trivial                |   Resolution:  wontfix
 Keywords:  has-patch 2nd-opinion  |  
-----------------------------------+----------------------------------------
Changes (by scribu):

  * status:  new => closed
  * resolution:  => wontfix
  * milestone:  3.0 =>


Comment:

 Replying to [comment:5 nacin]:
 > I'm not sure about this. With this patch, we may be generating some very
 long class names, and I don't think we use slugs anywhere else in
 body|post_class.

 I agree.

 If you really need this, you have the 'body_class' filter.

 Besides, you can add extra CSS from your page-glossary.php template:

 {{{
 <?php

 function extra_styles() {
   wp_enqueue_style('glossary', get_bloginfo('stylesheet_directory') .
 '/glossary.css');
 }
 add_action('wp_print_styles', 'extra_styles');

 get_header();

 ...
 }}}

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


More information about the wp-trac mailing list