Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Keeping It Simple

2,374 views

Published on

Minimizing the clutter on the WordPress administration screens and rearranging things to make life easier for users.

Published in: Technology
  • Be the first to like this

Keeping It Simple

  1. 1. Keeping It Simple (but not stupid) Stephanie Leary, @sleary sillybean.net
  2. 2. Dashboard & Menus
  3. 3. Unclutter: Adminimize
  4. 4. Dashboard Commander
  5. 5. Prefer Code?function remove_dashboard_widgets() { global $wp_meta_boxes; unset($wp_meta_boxes[dashboard][normal][core][dashboard_right_now]);// unset($wp_meta_boxes[dashboard][normal][core][dashboard_recent_comments]);// unset($wp_meta_boxes[dashboard][side][core][dashboard_quick_press]);// unset($wp_meta_boxes[dashboard][normal][core][dashboard_recent_drafts]); unset($wp_meta_boxes[dashboard][normal][core][dashboard_incoming_links]); unset($wp_meta_boxes[dashboard][normal][core][dashboard_plugins]); // WordPress Blog unset($wp_meta_boxes[dashboard][side][core][dashboard_primary]); // Other WordPress News unset($wp_meta_boxes[dashboard][side][core][dashboard_secondary]);}add_action(wp_dashboard_setup, remove_dashboard_widgets ); http://gist.github.com/2722692
  6. 6. CMS Dashboard
  7. 7. Full Comments On Dashboard
  8. 8. Dashboard Notepad
  9. 9. Widgetshttp://core.trac.wordpress.org/ticket/18334
  10. 10. Widgetshttp://core.trac.wordpress.org/ticket/18334
  11. 11. Organizing
  12. 12. Hierarchy
  13. 13. Simple Page Ordering
  14. 14. List Child Pages// list child pages automatically on empty pagesfunction append_child_pages($content) {   $children = ;   if (is_page() && (empty($content))) {      global $post;      $children = <ulclass="childpages">.wp_list_pages(echo=0&title_li=&child_of=.$post->ID).</ul>;   }   return $content.$children;}add_filter(the_content,append_child_pages);
  15. 15. List Child Pages// child page list shortcode: [children]function child_pages_shortcode() {   global $post;   return <ul class="childpages">." " wp_list_pages(echo=0&depth=0&title_li=&child_of=." " $post->ID).</ul>;}add_shortcode(children, child_pages_shortcode);
  16. 16. Writing
  17. 17. Shortcode Reference
  18. 18. Gallery Metabox
  19. 19. Post Container Warning
  20. 20. Post Container Warning// Admin Notice on Posts Pageadd_action(admin_head-post.php, postspage_error_notice);function postspage_error_notice() {    $postspage = get_option(page_for_posts);    if (!empty($postspage))        add_action(admin_notices, postspage_print_notices);}function postspage_print_notices() {    $postspage = get_option(page_for_posts);    // show this only if were editing the posts page    if (!empty($postspage) && isset($_GET[action]) &&$_GET[action] == edit && $_GET[post] == $postspage)        echo <div class="error"><p>This page is a container forthe most recent posts. It should always be empty, and you shouldnever edit this page. To add a news item, go to <a href="post-new.php">Posts -- Add New</a>.<p></div>;} http://gist.github.com/2515588
  21. 21. Removing Meta Boxesadd_action( add_meta_boxes, my_remove_post_meta_boxes );function my_remove_post_meta_boxes() {" /* Custom fields meta box. */" remove_meta_box( postcustom, post, normal );} justintadlock.com/?p=2898
  22. 22. Raw HTML Snippets
  23. 23. Notifications
  24. 24. Peter’s Collaboration Emails
  25. 25. Notifly
  26. 26. Collateral Condolences
  27. 27. For Visitors
  28. 28. Better 404s• apologetic, personal language• search for words in the bad URL• show search box and sitemap http://gist.github.com/2723096
  29. 29. 404.php (1)" <h2>Im sorry. I couldnt find the page you requested.</h2>" <?php" $options = us2011_get_options();" if (!empty($options[problem_report]))" " $report = If you still cant find it, <ahref=".get_permalink($options[problem_report]).">please let usknow what you were looking for,</a> and maybe we can find it foryou!;" if (!empty($options[sitemap]))" " $sitemap = or looking for it in the <a href="/sitemap">site map</a>;" ?>" <p>You can try searching for it<?php echo $sitemap; ?>." <?php echo $report; ?></p>" <?php get_template_part( searchform ); ?>
  30. 30. 404.php (2)" <?php" global $wp_query;" $wp_query->query_vars[is_search] = true;" $s = str_replace("-"," ",$wp_query->query_vars[name]);" $loop = new WP_Query(post_type=any&s=.$s);" ?>" <?php if ($loop->have_posts()) : ?>" " <p>Im searching for the name of the page you tried tovisit... was it one of these?</p>" " <ol>" " <?php while ($loop->have_posts()) : $loop->the_post(); ?>" " " <li><a href="<?php the_permalink(); ?>"><?phpthe_title(); ?></a>" " " " <?php the_excerpt(); ?>" " " </li>" " <?php endwhile; ?>" " </ol> "<?php endif; ?>
  31. 31. RSS?
  32. 32. “Report a problem”• More likely to be used than “contact”• Automatically fill in referring URL• Link in theme footer
  33. 33. Gravity Forms example
  34. 34. How do youkeep it simple?
  35. 35. Thanks! @slearysillybean.net

×