Keeping It Simple

Stephanie Leary
Stephanie LearyWeb designer, writer at WordPress consultant
Keeping It Simple
      (but not stupid)



   Stephanie Leary, @sleary
        sillybean.net
Dashboard & Menus
Keeping It Simple
Unclutter: Adminimize
Keeping It Simple
Keeping It Simple
Dashboard Commander
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
CMS Dashboard
Keeping It Simple
Full Comments On
    Dashboard
Dashboard Notepad
Widgets




http://core.trac.wordpress.org/ticket/18334
Widgets




http://core.trac.wordpress.org/ticket/18334
Organizing
Hierarchy
Keeping It Simple
Simple Page Ordering
Keeping It Simple
List Child Pages
// list child pages automatically on empty pages
function append_child_pages($content) {
   $children = '';
   if (is_page() && (empty($content))) {
      global $post;
      $children = '
<ul
class="childpages">'.wp_list_pages('echo=0&title_li=&child_of='.
$post->ID).'</ul>
';
   }
   return $content.$children;
}
add_filter('the_content','append_child_pages');
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');
Writing
Shortcode Reference
Gallery Metabox
Post Container Warning
Post Container Warning
// Admin Notice on Posts Page
add_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 we're 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 for
the most recent posts. It should always be empty, and you should
never 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
Removing Meta Boxes

add_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
Raw HTML Snippets
Notifications
Peter’s Collaboration
       Emails
Notifly
Collateral Condolences
Keeping It Simple
For Visitors
Better 404s


• apologetic, personal language
• search for words in the bad URL
• show search box and sitemap


     http://gist.github.com/2723096
404.php (1)
"   <h2>I'm sorry. I couldn't find the page you requested.</h2>
"   <?php
"   $options = us2011_get_options();
"   if (!empty($options['problem_report']))
"   "   $report = 'If you still can't find it, <a
href="'.get_permalink($options['problem_report']).'">please let us
know what you were looking for,</a> and maybe we can find it for
you!';
"   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' ); ?>
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>I'm searching for the name of the page you tried to
visit... was it one of these?</p>
"    "   <ol>
"    "   <?php while ($loop->have_posts()) : $loop->the_post(); ?>
"   "   "   <li><a href="<?php the_permalink(); ?>"><?php
the_title(); ?></a>
"    "   "   "   <?php the_excerpt(); ?>
"    "   "   </li>
"    "   <?php endwhile; ?>
"    "   </ol>
    "<?php endif; ?>
RSS?
Keeping It Simple
“Report a problem”


• More likely to be used than “contact”
• Automatically fill in referring URL
• Link in theme footer
Gravity Forms example
How do you
keep it simple?
Thanks!
   @sleary
sillybean.net
1 of 43

Recommended

WordPress Theme Design and Development Workshop - Day 3 by
WordPress Theme Design and Development Workshop - Day 3WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3Mizanur Rahaman Mizan
894 views16 slides
Clever Joomla! Templating Tips and Tricks by
Clever Joomla! Templating Tips and TricksClever Joomla! Templating Tips and Tricks
Clever Joomla! Templating Tips and TricksThemePartner
1.9K views55 slides
20. CodeIgniter edit images by
20. CodeIgniter edit images20. CodeIgniter edit images
20. CodeIgniter edit imagesRazvan Raducanu, PhD
1.1K views21 slides
Web development today by
Web development todayWeb development today
Web development todayHesham Amin
428 views16 slides
12. edit record by
12. edit record12. edit record
12. edit recordRazvan Raducanu, PhD
616 views3 slides
PHP and Rich Internet Applications by
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
4K views47 slides

More Related Content

What's hot

16. CodeIgniter stergerea inregistrarilor by
16. CodeIgniter stergerea inregistrarilor16. CodeIgniter stergerea inregistrarilor
16. CodeIgniter stergerea inregistrarilorRazvan Raducanu, PhD
16 views4 slides
8. vederea inregistrarilor by
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilorRazvan Raducanu, PhD
192 views16 slides
PHP and Rich Internet Applications by
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
2.8K views47 slides
Bag Of Tricks From Iusethis by
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From IusethisMarcus Ramberg
6.4K views88 slides
WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t... by
WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t...WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t...
WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t...allilevine
1.6K views45 slides
Pagination in PHP by
Pagination in PHPPagination in PHP
Pagination in PHPVineet Kumar Saini
2.5K views6 slides

What's hot(20)

PHP and Rich Internet Applications by elliando dias
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias2.8K views
Bag Of Tricks From Iusethis by Marcus Ramberg
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
Marcus Ramberg6.4K views
WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t... by allilevine
WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t...WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t...
WordCamp Montreal 2015: Combining Custom Post Types, Fields, and Meta Boxes t...
allilevine1.6K views
Gravity Forms Hooks & Filters by iamdangavin
Gravity Forms Hooks & FiltersGravity Forms Hooks & Filters
Gravity Forms Hooks & Filters
iamdangavin6K views
Let's write secure Drupal code! by Balázs Tatár
Let's write secure Drupal code!Let's write secure Drupal code!
Let's write secure Drupal code!
Balázs Tatár441 views
Анатолий Поляков - Drupal.ajax framework from a to z by LEDC 2016
Анатолий Поляков - Drupal.ajax framework from a to zАнатолий Поляков - Drupal.ajax framework from a to z
Анатолий Поляков - Drupal.ajax framework from a to z
LEDC 2016509 views
Settings API - Oslo WordPress Meetup - November 22, 2011 by WPOslo
Settings API - Oslo WordPress Meetup - November 22, 2011Settings API - Oslo WordPress Meetup - November 22, 2011
Settings API - Oslo WordPress Meetup - November 22, 2011
WPOslo281 views
WordPress overloading Gravityforms using hooks, filters and extending classes by Paul Bearne
WordPress overloading Gravityforms using hooks, filters and extending classes WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes
Paul Bearne3.7K views
Make your own wp cli command in 10min by Ivelina Dimova
Make your own wp cli command in 10minMake your own wp cli command in 10min
Make your own wp cli command in 10min
Ivelina Dimova1.4K views
JavaScriptフレームワーク比較! by CASAREAL, Inc.
JavaScriptフレームワーク比較!JavaScriptフレームワーク比較!
JavaScriptフレームワーク比較!
CASAREAL, Inc.7.3K views
Sins Against Drupal 2 by Aaron Crosman
Sins Against Drupal 2Sins Against Drupal 2
Sins Against Drupal 2
Aaron Crosman1.8K views

Viewers also liked

Boost your happiness at work by
Boost your happiness at workBoost your happiness at work
Boost your happiness at workBalasubramanian Kalyanaraman
502 views11 slides
Strive for Inbox Zero and Unclutter Your Business Mind by
Strive for Inbox Zero and Unclutter Your Business MindStrive for Inbox Zero and Unclutter Your Business Mind
Strive for Inbox Zero and Unclutter Your Business MindAffiliate Summit
1.3K views21 slides
Unclutter by
UnclutterUnclutter
UnclutterEl Shaddai Christian Church
265 views6 slides
Technology for Organizing by
Technology for OrganizingTechnology for Organizing
Technology for OrganizingEllen DePasquale
624 views22 slides
Create an Organized Workspace by
Create an Organized WorkspaceCreate an Organized Workspace
Create an Organized WorkspaceNAPO Houston
436 views8 slides
It’s all too much! Unclutter your house in the New Year by
It’s all too much!  Unclutter your house in the New Year It’s all too much!  Unclutter your house in the New Year
It’s all too much! Unclutter your house in the New Year Lisa Hooper
496 views15 slides

Similar to Keeping It Simple

Drupal Development (Part 2) by
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)Jeff Eaton
2.1K views79 slides
Daily notes by
Daily notesDaily notes
Daily notesmeghendra168
885 views46 slides
Wp query by
Wp queryWp query
Wp querySavita Soni
6.6K views33 slides
You Don't Know Query (WordCamp Netherlands 2012) by
You Don't Know Query (WordCamp Netherlands 2012)You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)andrewnacin
62.3K views69 slides
Add loop shortcode by
Add loop shortcodeAdd loop shortcode
Add loop shortcodePeter Baylies
316 views2 slides
Zero to SOLID by
Zero to SOLIDZero to SOLID
Zero to SOLIDVic Metcalfe
943 views84 slides

Similar to Keeping It Simple(20)

Drupal Development (Part 2) by Jeff Eaton
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
Jeff Eaton2.1K views
You Don't Know Query (WordCamp Netherlands 2012) by andrewnacin
You Don't Know Query (WordCamp Netherlands 2012)You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)
andrewnacin62.3K views
WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress by WordCamp Kyiv
WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress
WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress
WordCamp Kyiv340 views
PHPSpec - the only Design Tool you need - 4Developers by Kacper Gunia
PHPSpec - the only Design Tool you need - 4DevelopersPHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4Developers
Kacper Gunia37.3K views
You Don't Know Query - WordCamp Portland 2011 by andrewnacin
You Don't Know Query - WordCamp Portland 2011You Don't Know Query - WordCamp Portland 2011
You Don't Know Query - WordCamp Portland 2011
andrewnacin11.1K views
Tidy Up Your Code by Abbas Ali
Tidy Up Your CodeTidy Up Your Code
Tidy Up Your Code
Abbas Ali3 views
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need by Kacper Gunia
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you needDutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Dutch PHP Conference - PHPSpec 2 - The only Design Tool you need
Kacper Gunia50.4K views
Using Geeklog as a Web Application Framework by Dirk Haun
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
Dirk Haun894 views
logic321 by logic321
logic321logic321
logic321
logic321358 views
50 Laravel Tricks in 50 Minutes by Azim Kurtaliev
50 Laravel Tricks in 50 Minutes50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
Azim Kurtaliev1.7K views
laravel tricks in 50minutes by Barang CK
laravel tricks in 50minuteslaravel tricks in 50minutes
laravel tricks in 50minutes
Barang CK393 views

More from Stephanie Leary

WordPress for the 99% by
WordPress for the 99%WordPress for the 99%
WordPress for the 99%Stephanie Leary
650 views181 slides
Content First in Action by
Content First in ActionContent First in Action
Content First in ActionStephanie Leary
639 views75 slides
Writing for the Web in Government and Education by
Writing for the Web in Government and EducationWriting for the Web in Government and Education
Writing for the Web in Government and EducationStephanie Leary
513 views59 slides
Getting to WordPress by
Getting to WordPressGetting to WordPress
Getting to WordPressStephanie Leary
1.9K views45 slides
Content Strategy for WordPress: Case Study by
Content Strategy for WordPress: Case StudyContent Strategy for WordPress: Case Study
Content Strategy for WordPress: Case StudyStephanie Leary
45.7K views37 slides
Content Strategy for WordPress by
Content Strategy for WordPressContent Strategy for WordPress
Content Strategy for WordPressStephanie Leary
6.1K views51 slides

More from Stephanie Leary(19)

Writing for the Web in Government and Education by Stephanie Leary
Writing for the Web in Government and EducationWriting for the Web in Government and Education
Writing for the Web in Government and Education
Stephanie Leary513 views
Content Strategy for WordPress: Case Study by Stephanie Leary
Content Strategy for WordPress: Case StudyContent Strategy for WordPress: Case Study
Content Strategy for WordPress: Case Study
Stephanie Leary45.7K views
Content Strategy for WordPress by Stephanie Leary
Content Strategy for WordPressContent Strategy for WordPress
Content Strategy for WordPress
Stephanie Leary6.1K views
WordPress Hidden Gems (July 2011) by Stephanie Leary
WordPress Hidden Gems (July 2011)WordPress Hidden Gems (July 2011)
WordPress Hidden Gems (July 2011)
Stephanie Leary1.2K views
WordPress Tips and Tricks (DFW Meetup) by Stephanie Leary
WordPress Tips and Tricks (DFW Meetup)WordPress Tips and Tricks (DFW Meetup)
WordPress Tips and Tricks (DFW Meetup)
Stephanie Leary6.1K views
What's New in WordPress 3.0 (for developers) by Stephanie Leary
What's New in WordPress 3.0 (for developers)What's New in WordPress 3.0 (for developers)
What's New in WordPress 3.0 (for developers)
Stephanie Leary1K views

Recently uploaded

Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
121 views15 slides
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineShapeBlue
154 views19 slides
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
443 views92 slides
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesShapeBlue
178 views15 slides
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...ShapeBlue
74 views17 slides
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...ShapeBlue
93 views13 slides

Recently uploaded(20)

Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue154 views
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue178 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue74 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue93 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE67 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue138 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue147 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays49 views
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue59 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue105 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash103 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue114 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue218 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10110 views

Keeping It Simple

  • 1. Keeping It Simple (but not stupid) Stephanie Leary, @sleary sillybean.net
  • 8. 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
  • 11. Full Comments On Dashboard
  • 20. List Child Pages // list child pages automatically on empty pages function append_child_pages($content) {    $children = '';    if (is_page() && (empty($content))) {       global $post;       $children = ' <ul class="childpages">'.wp_list_pages('echo=0&title_li=&child_of='. $post->ID).'</ul> ';    }    return $content.$children; } add_filter('the_content','append_child_pages');
  • 21. 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');
  • 26. Post Container Warning // Admin Notice on Posts Page add_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 we're 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 for the most recent posts. It should always be empty, and you should never 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
  • 27. Removing Meta Boxes add_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
  • 35. Better 404s • apologetic, personal language • search for words in the bad URL • show search box and sitemap http://gist.github.com/2723096
  • 36. 404.php (1) " <h2>I'm sorry. I couldn't find the page you requested.</h2> " <?php " $options = us2011_get_options(); " if (!empty($options['problem_report'])) " " $report = 'If you still can't find it, <a href="'.get_permalink($options['problem_report']).'">please let us know what you were looking for,</a> and maybe we can find it for you!'; " 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' ); ?>
  • 37. 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>I'm searching for the name of the page you tried to visit... was it one of these?</p> " " <ol> " " <?php while ($loop->have_posts()) : $loop->the_post(); ?> " " " <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> " " " " <?php the_excerpt(); ?> " " " </li> " " <?php endwhile; ?> " " </ol> "<?php endif; ?>
  • 38. RSS?
  • 40. “Report a problem” • More likely to be used than “contact” • Automatically fill in referring URL • Link in theme footer
  • 42. How do you keep it simple?
  • 43. Thanks! @sleary sillybean.net

Editor's Notes

  1. First I&amp;#x2019;m going to talk about simplifying the admin screens for your users, and then I&amp;#x2019;ll talk about some things we can do to make life easier for our readers.\n
  2. \n
  3. 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&amp;#x2019;t have to suck, but we&amp;#x2019;re going to have to put a little effort into un-sucking it.\n
  4. \n
  5. Now we&amp;#x2019;re down to the things that are useful for everyone: comments and recent drafts. If you&amp;#x2019;ve disabled comments sitewide, blow that one away. If you&amp;#x2019;re not using Posts, QuickPress is useless, so get rid of that too!\n
  6. Adminimize has a TON of other options. Its settings screen is one of the longest I&amp;#x2019;ve ever seen.\n
  7. 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
  8. \n
  9. Now that we&amp;#x2019;ve gotten rid of the junk, let&amp;#x2019;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&amp;#x2019;re trying to manage your site from a touch screen.\n
  10. Now we&amp;#x2019;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
  11. Scribu&amp;#x2019;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
  12. Lastly, I&amp;#x2019;m going to recommend one of my own plugins. Dashboard Notepad is a simple way to leave reminders for yourself or your users.\n
  13. The widget screen drives me nuts! Sites do more than just sidebars with widgets, and the stacked boxes on the widget screen don&amp;#x2019;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&amp;#x2019;t do much more than make them wider...\n
  14. 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
  15. \n
  16. 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&amp;#x2019; order in the list and turn off their menu items.\n
  17. If they&amp;#x2019;re non-hierarchical, you&amp;#x2019;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&amp;#x2019;s fairly good.\n\nWithin the pages, though, it&amp;#x2019;s still a pain to change their order! After all this time!\n
  18. Simple Page Ordering is the easiest way I&amp;#x2019;ve found to rearrange pages. The entire table row becomes grabbable, and you can drag the pages around. You can&amp;#x2019;t change their hierarchy, though -- you&amp;#x2019;ll still have to use Quick Edit to set the parent page.\n
  19. It even works in the media uploader!\n
  20. A big problem I always have with page-centric sites is that there&amp;#x2019;s usually more than one empty container page -- a page that&amp;#x2019;s just there to build the hierarchy. It doesn&amp;#x2019;t need to contain any content. It just needs to link to its child pages. So I&amp;#x2019;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&amp;#x2019;s the filter for the empty pages...\n
  21. ... and here&amp;#x2019;s the shortcode.\n\nShortcodes themselves are problematic, though, and that leads me to the problems with the writing screens.\n
  22. 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
  23. Once you start adding plugins, it&amp;#x2019;s easy to forget which shortcodes are available, or what they all do. The Shortcode Reference plugin adds a box that reminds you.\n
  24. A lot of my users have a hard time with the Gallery. They don&amp;#x2019;t realize that a post sometimes already has attachments, and they upload duplicates. Then they can&amp;#x2019;t remember how to get back to those files and insert them into the post. Bill&amp;#x2019;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
  25. Here&amp;#x2019;s another thing some of my users can&amp;#x2019;t ever remember, especially on sites that don&amp;#x2019;t use the posts much. When we&amp;#x2019;ve chosen a page to display the most recent posts, there&amp;#x2019;s this empty page floating around, and users forget that they can&amp;#x2019;t edit this page to add a new post! I&amp;#x2019;ve written a little function to warn them that they&amp;#x2019;re in the wrong place, and give them a link to the new post screen.\n
  26. The code isn&amp;#x2019;t complicated; it&amp;#x2019;s just long because there&amp;#x2019;s a whole paragraph of text in there. Grab the Gist if you want to use it.\n
  27. Now that we&amp;#x2019;ve added a bunch of stuff, let&amp;#x2019;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&amp;#x2019;s made things so much simpler for my users. But every now and then, there&amp;#x2019;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&amp;#x2019;m just removing custom fields.\n
  28. \n
  29. A lot of the sites I manage have a need for reusable bits of code, and widgets aren&amp;#x2019;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
  30. Let&amp;#x2019;s talk about email! WordPress sends out a lot of notifications -- comments awaiting moderation, etc. -- but there&amp;#x2019;s one thing it doesn&amp;#x2019;t do, and it drives me bonkers. It doesn&amp;#x2019;t alert editors or administrators when a contributor&amp;#x2019;s post is pending review.\n
  31. This plugin lets you choose who should receive notifications about pending posts. There&amp;#x2019;s a companion plugin, Peter&amp;#x2019;s Post Notes, that will let you add remarks to the notifications, so if you&amp;#x2019;re rejecting a contributed post, you can mention why.\n
  32. 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
  33. This little plugin lets users know when they&amp;#x2019;ve fallen into your spam trap.\n
  34. What else can we do to make life better for visitors?\n
  35. \n
  36. A 404 error is the most frustrating thing for a visitor, and there&amp;#x2019;s a lot we can do besides showing them a joke or a game.\n
  37. \n
  38. \n
  39. How many of us are still putting up RSS icons without explaining what RSS is? And yet it&amp;#x2019;s still not widely adopted outside the tech industry.\n
  40. 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
  41. \n
  42. \n
  43. \n
  44. \n