[wp-trac] [WordPress Trac] #27031: Twenty Fourteen theme assumes all archive pages are list views

WordPress Trac noreply at wordpress.org
Wed Feb 12 22:01:17 UTC 2014


#27031: Twenty Fourteen theme assumes all archive pages are list views
-------------------------------------------------+--------------------
 Reporter:  netweb                               |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  3.9
Component:  Bundled Theme                        |     Version:  3.8.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing ui-feedback  |     Focuses:
-------------------------------------------------+--------------------

Comment (by johnjamesjacoby):

 TwentyFourteen assumes (incorrectly IMO) every archive is a list-view,
 then hides the entire content body as a result with CSS.

 No plugin (or child theme for that matter) should need to perform
 additional, proprietary steps to make custom post-type archives function
 and display normally.

 To duplicate outside of bbPress (though that shouldn't be necessary):

 * Add this to an `mu-plugin` of your choosing:

 {{{
 add_action( 'init', function() {
         register_post_type( 'jjj', array(
                 'labels'               => array(),
                 'public'               => true,
                 'publicly_queryable'   => true,
                 'show_ui'              => true,
                 'show_in_menu'         => true,
                 'show_in_nav_menus'    => true,
                 'show_in_admin_bar'    => true,
                 'menu_position'        => 50,
                 'menu_icon'            => 'dashicons-calendar',
                 'capability_type'      => 'post',
                 'has_archive'          => true,
         ) );
 } );
 }}}
 * Create some new posts with this new type.
 * Visit your: `domain.com/jjj/` where 'jjj' is the assumed archive slug
 * Shrink your browser width to trigger the mobile responsiveness
 * Watch the faux-calendar content disappear

 In this imaginary scenario, an events plugin with an archive of events
 just lost all of its content because of an overly aggressive CSS rule. If
 the intent is to simplify the blog view by hiding the content of each
 post, we should target the blog view explicitly and keep other plugins out
 of harms way.

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


More information about the wp-trac mailing list