WordPress.org

Make WordPress Core

Changeset 17672


Ignore:
Timestamp:
04/21/2011 07:43:25 AM (9 years ago)
Author:
westi
Message:

Provide more arguments to the widgets on the 404 page so as to avoid notices. See #17198

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/404.php

    r17669 r17672  
    2020                    <?php get_search_form(); ?>
    2121
    22                     <?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
     22                    <?php the_widget( 'WP_Widget_Recent_Posts', array( 'number' => 10 ), array( 'widget_id' => '404' ) ); ?>
    2323
    2424                    <div class="widget">
     
    3131                    <?php
    3232                    $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>';
    33                     the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
     33                    the_widget( 'WP_Widget_Archives', array('count' => 0 , 'dropdown' => 1 ), "after_title=</h2>$archive_content" );
    3434                    ?>
    3535
Note: See TracChangeset for help on using the changeset viewer.