Managing event dates vs published dates in admin custom post type

I had to do this on a program management system. this should do the trick. add_filter( ‘pre_get_posts’, ‘my_sort_posts_listing’ ); function my_sort_posts_listing( $wp_query ) { if ( is_admin() && $wp_query->get( ‘post_type’ ) == ‘my_post_type’ ) { $wp_query->set( ‘meta_key’, ‘_my_date_meta’ ); $wp_query->set( ‘orderby’, ‘meta_value’ ); $wp_query->set( ‘order’, ‘DESC’ ); } return $wp_query; } assuming your dates are … Read more

Enabling Default Widgets in a Custom Theme

that’s not the way, wp_register_sidebar_widget is used to create widgets. if you want your sidebar to display widgets by default use [dynamic_sidebar()][1] in your theme eg from the 2010 theme: <div id=”primary” class=”widget-area” role=”complementary”> <ul class=”xoxo”> <?php /* When we call the dynamic_sidebar() function, it’ll spit out * the widgets for that widget area. If … Read more