[Plugin: WenderHost Subpages Widget] Add support for listing by post date
-
You can edit this plugin pretty easily to sort by post date also.
Look for
$menu_order_chk = ''; $post_title_chk = ''; ( $instance['sort'] == 'menu_order' )? $menu_order_chk = ' checked="checked"' : $post_title_chk = ' checked="checked"';
and change it to
$menu_order_chk = ''; $post_title_chk = ''; $post_date_chk = ''; if( $instance['hide_title'] == true ) $hide_title_chk = ' checked="checked"'; $menu_order_chk = ''; $post_title_chk = ''; $post_date_chk = ''; if ( $instance['sort'] == 'post_date' ) { $post_date_chk = ' checked="checked"'; } else if ( $instance['sort'] == 'post_title' ) { $post_title_chk = ' checked="checked"'; } else { $menu_order_chk = ' checked="checked"'; }
and add
<li><label for="<?php echo $this->get_field_id('sort') ?>"><input type="radio" id="<?php echo $this->get_field_id('sort') ?>" name="<?php echo $this->get_field_name('sort'); ?>" value="post_date"<?php echo $post_date_chk ?> /> <?php _e('Publish Date') ?></label></li>
to the list of options
http://wordpress.org/extend/plugins/wenderhost-subpages-widget/
- The topic ‘[Plugin: WenderHost Subpages Widget] Add support for listing by post date’ is closed to new replies.