Keeping It Simple


Published on

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

Published in: Technology
1 Comment
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • First I’m going to talk about simplifying the admin screens for your users, and then I’ll talk about some things we can do to make life easier for our readers.\n
  • \n
  • The Dashboard: the first thing everyone sees when they log in, and the least useful screen there is. How many of us have gotten into the habit of skipping this -- of bookmarking the post or page edit screen instead? The Dashboard doesn’t have to suck, but we’re going to have to put a little effort into un-sucking it.\n
  • \n
  • Now we’re down to the things that are useful for everyone: comments and recent drafts. If you’ve disabled comments sitewide, blow that one away. If you’re not using Posts, QuickPress is useless, so get rid of that too!\n
  • Adminimize has a TON of other options. Its settings screen is one of the longest I’ve ever seen.\n
  • Dashboard Commander is a less intimidating plugin for accomplishing the same thing. Its settings are a little quirky, though: it asks you to set a minimum capability for each Dashboard widget.\n
  • \n
  • Now that we’ve gotten rid of the junk, let’s ADD something useful. The CMS Dashboard widget provides big, fat buttons to the most important admin screens. These should be easy to click if you’re trying to manage your site from a touch screen.\n
  • Now we’re getting somewhere! But wait... that comment widget is still pretty useless. Even the starter comment is too long to be displayed in full.\n
  • Scribu’s Full Comments on Dashboard plugin does exactly what it says. There are no settings. You just activate it, and the Dashboard plugin shows the full comment text.\n
  • Lastly, I’m going to recommend one of my own plugins. Dashboard Notepad is a simple way to leave reminders for yourself or your users.\n
  • The widget screen drives me nuts! Sites do more than just sidebars with widgets, and the stacked boxes on the widget screen don’t make sense to users. I started playing around with the admin CSS to see if I could override it and do something better. In 3.2, I couldn’t do much more than make them wider...\n
  • But in 3.3, the sidebar boxes have unique IDs, which means you can hook into the admin CSS and move them around. Careful, though -- this requires absolute positioning, and the boxes start to overlap if you have too many widgets in a single sidebar. See the ticket for sample CSS file and hooks in the functions.php.\n
  • \n
  • Hierarchy is a somewhat new plugin. It gives you a menu item called Content right under the Dashboard, and the Content screen shows you a combined list of all your custom post types. On the settings page for the plugin, you can arrange the post types’ order in the list and turn off their menu items.\n
  • If they’re non-hierarchical, you’ll just see a link to the Edit screen for that post type.\n\nThe author of this plugin, Jonathan Christopher, also has a book called Client Oriented WordPress Development. It’s fairly good.\n\nWithin the pages, though, it’s still a pain to change their order! After all this time!\n
  • Simple Page Ordering is the easiest way I’ve found to rearrange pages. The entire table row becomes grabbable, and you can drag the pages around. You can’t change their hierarchy, though -- you’ll still have to use Quick Edit to set the parent page.\n
  • It even works in the media uploader!\n
  • A big problem I always have with page-centric sites is that there’s usually more than one empty container page -- a page that’s just there to build the hierarchy. It doesn’t need to contain any content. It just needs to link to its child pages. So I’ve built a mini-plugin that I use on almost all my sites. It lists the child pages on any page without content, and it provides a shortcode so we can embed the list on other pages as needed. Here’s the filter for the empty pages...\n
  • ... and here’s the shortcode.\n\nShortcodes themselves are problematic, though, and that leads me to the problems with the writing screens.\n
  • Really, the writing screens are outstanding. It seems silly to quibble here, when I go around telling everyone that this is the best feature of WordPress. However...\n
  • Once you start adding plugins, it’s easy to forget which shortcodes are available, or what they all do. The Shortcode Reference plugin adds a box that reminds you.\n
  • A lot of my users have a hard time with the Gallery. They don’t realize that a post sometimes already has attachments, and they upload duplicates. Then they can’t remember how to get back to those files and insert them into the post. Bill’s Gallery Metabox plugin adds thumbnails of the uploaded images right on the editing screen. You can drag them into the post to insert them.\n
  • Here’s another thing some of my users can’t ever remember, especially on sites that don’t use the posts much. When we’ve chosen a page to display the most recent posts, there’s this empty page floating around, and users forget that they can’t edit this page to add a new post! I’ve written a little function to warn them that they’re in the wrong place, and give them a link to the new post screen.\n
  • The code isn’t complicated; it’s just long because there’s a whole paragraph of text in there. Grab the Gist if you want to use it.\n
  • Now that we’ve added a bunch of stuff, let’s take some stuff away! As of 3.1, most of the meta boxes are hidden by default, and you have to go to Screen Options to turn them on. I love this. It’s made things so much simpler for my users. But every now and then, there’s a box I want to take away from them altogether -- like Custom Fields. I always want users to manage those using a custom meta box. Justin Tadlock has written a nice little tutorial on removing meta boxes. He gives you the names of all the built-in boxes, but here I’m just removing custom fields.\n
  • \n
  • A lot of the sites I manage have a need for reusable bits of code, and widgets aren’t always the right solution -- what if you need to embed the code in the middle of a post? There are two plugins I like to solve this problem, Post Snippets and Raw HTML Snippets. I think this one is a little easier to use. Enter your HTML, then use the shortcode to place it wherever you need it.\n
  • Let’s talk about email! WordPress sends out a lot of notifications -- comments awaiting moderation, etc. -- but there’s one thing it doesn’t do, and it drives me bonkers. It doesn’t alert editors or administrators when a contributor’s post is pending review.\n
  • This plugin lets you choose who should receive notifications about pending posts. There’s a companion plugin, Peter’s Post Notes, that will let you add remarks to the notifications, so if you’re rejecting a contributed post, you can mention why.\n
  • Notifly is a great little plugin when you want a lot of users to subscribe to post AND comment notifications. Notifly sends out a message for everything that gets posted.\n
  • This little plugin lets users know when they’ve fallen into your spam trap.\n
  • What else can we do to make life better for visitors?\n
  • \n
  • A 404 error is the most frustrating thing for a visitor, and there’s a lot we can do besides showing them a joke or a game.\n
  • \n
  • \n
  • How many of us are still putting up RSS icons without explaining what RSS is? And yet it’s still not widely adopted outside the tech industry.\n
  • On this site, we linked the question to a long explanation that I wrote, but you could like to Wikipedia or any other site that describes how to subscribe to a feed.\n
  • \n
  • \n
  • \n
  • \n
  • Keeping It Simple

    1. 1. Keeping It Simple (but not stupid) Stephanie Leary, @sleary
    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 );
    6. 6. CMS Dashboard
    7. 7. Full Comments On Dashboard
    8. 8. Dashboard Notepad
    9. 9. Widgets
    10. 10. Widgets
    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>;}
    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 );}
    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
    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!