Dashboard show only published pages instead of all pages

Try this solution. Works for me. add_action( ‘admin_menu’, ‘customize_pages_admin_menu_callback’ ); function customize_pages_admin_menu_callback() { global $submenu; foreach ( $submenu[‘edit.php?post_type=page’] as $key => $value ) { if ( in_array( ‘edit.php?post_type=page’, $value ) ) { $submenu[‘edit.php?post_type=page’][ $key ][2] = ‘edit.php?post_status=publish&post_type=page’; } } } further, you can also hide All using CSS if needed. <style> .post-type-page .subsubsub .all{ display:none} … Read more

Unable to add options on dashboard widget ?

$args[‘before_widget’] and $args[‘afters_widget’] (or after_widget) are things you’d add to a front-end sidebar widget. They have no relevance to dashboard widgets. The call to $args[‘before_widget’] is likely throwing an error because it’s not set. Also, your wp_dashboard_setup hook callback is an anonymous function. This won’t work on PHP < 5.3. So double check your PHP … Read more