[wp-trac] [WordPress Trac] #36510: Twenty eleven page templates with widgets incorrectly styled

WordPress Trac noreply at wordpress.org
Sat Apr 16 21:51:07 UTC 2016


#36510: Twenty eleven page templates with widgets incorrectly styled
-------------------------------------------------+--------------------
 Reporter:  Clorith                              |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  4.5.1
Component:  Bundled Theme                        |     Version:  4.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion needs-testing  |     Focuses:  ui
-------------------------------------------------+--------------------

Comment (by Clorith):

 Replying to [comment:36 swissspidy]:
 > Despite the `singular` body class being useful, I'm currently in favour
 of fixing this issue by reverting [36112]. Just too many themes add it on
 their own, as we can see here in the case of Twenty Eleven.
 >
 > The class hasn't been announced publicly AFAIK, so it wouldn't be a big
 deal. If one really wants to target all single post objects (which
 `.singular` does, after all), you can just target `.single, .page,
 .attachment`.
 >
 > So just 1 revert that would go into 4.6 and 4.5.1 instead of releasing
 new versions of the themes or something like that.
 >
 > See [attachment:36510.diff].

 Had a quick check, couldn't find any announcement of the new class so I
 think this would be a safe presumption and most likely (from observation)
 the best approach.

 We don't know if any other themes might have been using their own
 variation of singular in their styles as well pre 4.5, as it's much more
 obvious with default themes.

 Any new theme that are basing their code off the 4.5 class can very easily
 implement it them selves using the `body_class` filter as well so they
 don't lose out on anything if we revert.

 {{{
 function themeslug_singular_body_tag( $tags ) {
         if ( is_singular() ) {
                 $tags[] = 'singular';
         }
         return $tags;
 }
 add_filter( 'body_class', 'themeslug_singular_body_tag' );
 }}}

 For those asking how to apply patches, it's covered in the handbook at
 https://make.wordpress.org/core/handbook/tutorials/working-with-patches/

 Other than that I'd request that comments not directly relating to the
 ticket at hand be directed to the forums at https://wordpress.org/support
 as this ticket is getting a bit messy and hard to keep track of.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36510#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list