Successfully reported this slideshow.
Your SlideShare is downloading. ×

WordPress 3.1 at DC PHP

More Related Content

WordPress 3.1 at DC PHP

  1. 1. WordPress 3.1 DC PHP
  2. 2. @nacin Andrew Nacin andrewnacin.com nacin@wordpress.org
  3. 3. What’s next?
  4. 4. Post formats
  5. 5. Admin bar
  6. 6. Internal linking
  7. 7. Incremental improvements
  8. 8. UI & UX (always)
  9. 9. AJAX goodness
  10. 10. Network Admin
  11. 11. Taxonomy queries
  12. 12. query_posts('cat=123&author=456');   query_posts(array(      'cat'  =>  123,      'author'  =>  456,   )  );   $myquery['cat']  =  123;   $myquery['author']  =  456;   query_posts(  $myquery  );  
  13. 13. And Tag A and Tag B and Tag C Or Category A or Category B Not Neither Category A nor B
  14. 14. And tag__and, category__and Or tag__in, category__in Not tag__not_in, category__not_in
  15. 15. And across taxonomies Tag A and Category B Or across taxonomies Tag A or Category B Not across taxonomies Neither Tag A nor Category B
  16. 16. $myquery['tax_query']  =  array(     array(       'taxonomy'  =>  'category',       'terms'  =>  array('foo'),       'field'  =>  'slug',     ),     array(       'taxonomy'  =>  'post_tag',       'terms'  =>  array('bar'),       'field'  =>  'slug',     ),   );   query_posts(  $myquery  );  
  17. 17. $myquery['tax_query']  =  array(     array(       'taxonomy'  =>  'category',       'terms'  =>  array('foo',  'bar'),       'field'  =>  'slug',       'operator'  =>  'NOT  IN',     ),   );   query_posts(  $myquery  );  
  18. 18. $myquery['tax_query']  =  array(     'relation'  =>  'OR',     array(       'taxonomy'  =>  'category',       'terms'  =>  array('foo'),       'field'  =>  'slug',     ),     array(       'taxonomy'  =>  'post_tag',       'terms'  =>  array('bar'),       'field'  =>  'slug',     ),   );   query_posts(  $myquery  );  
  19. 19. http://otto42.com/81 (required reading)
  20. 20. Custom post types
  21. 21.   register_post_type(  'members',        array(       'labels'  =>  array(         'name'  =>  'Members',         'singular_name'  =>  'Member',         ),       'public'  =>  true,       'show_ui'  =>  true,       'rewrite'  =>  array(         'slug'  =>  'member',         ),       'has_archive'  =>  true,     )  );  
  22. 22.   register_post_type(  'members',        array(       'labels'  =>  array(         'name'  =>  'Members',         'singular_name'  =>  'Member',         ),       'public'  =>  true,       'show_ui'  =>  true,       'rewrite'  =>  array(         'slug'  =>  'member',         ),       'has_archive'  =>  'team',     )  );  
  23. 23. /team/ /member/nacin/ archive-­‐members.php   single-­‐members.php  
  24. 24. Have fun breaking WordPress
  25. 25. Beta 2 will be released tomorrow

×