WordPress 3.1    DC PHP
@nacin    Andrew Nacin  andrewnacin.comnacin@wordpress.org
What’s next?
Postformats
Admin bar
Internal linking
Incrementalimprovements
UI & UX (always)
AJAXgoodness
Network Admin
Taxonomy queries
query_posts(cat=123&author=456);	  query_posts(array(	  	  	  cat	  =>	  123,	  	  	  author	  =>	  456,	  )	  );	  $myque...
AndTag A and Tag B and Tag C           OrCategory A or Category B          NotNeither Category A nor B
And  tag__and, category__and             Or    tag__in, category__in            Nottag__not_in, category__not_in
And across taxonomies   Tag A and Category B   Or across taxonomies    Tag A or Category B   Not across taxonomiesNeither ...
$myquery[tax_query]	  =	  array(	  	   array(	  	   	   taxonomy	  =>	  category,	  	   	   terms	  =>	  array(foo),	  	  ...
$myquery[tax_query]	  =	  array(	  	   array(	  	   	   taxonomy	  =>	  category,	  	   	   terms	  =>	  array(foo,	  bar)...
$myquery[tax_query]	  =	  array(	  	   relation	  =>	  OR,	  	   array(	  	   	   taxonomy	  =>	  category,	  	   	   term...
http://otto42.com/81   (required reading)
Custompost types
  register_post_type(	  members,	  	  	  	  array(	  	   	   labels	  =>	  array(	  	   	   	   name	  =>	  Members,	  	  ...
  register_post_type(	  members,	  	  	  	  array(	  	   	   labels	  =>	  array(	  	   	   	   name	  =>	  Members,	  	  ...
/team//member/nacin/archive-­‐members.php	  single-­‐members.php	  
Have funbreakingWordPress
Beta 2 willbe released tomorrow
WordPress 3.1 at DC PHP
WordPress 3.1 at DC PHP
WordPress 3.1 at DC PHP
WordPress 3.1 at DC PHP
WordPress 3.1 at DC PHP
WordPress 3.1 at DC PHP
Upcoming SlideShare
Loading in …5
×

WordPress 3.1 at DC PHP

3,576 views
3,496 views

Published on

My lightning talk on WordPress 3.1 at the DC PHP December meetup. Intenr

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,576
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
14
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

WordPress 3.1 at DC PHP

  1. 1. WordPress 3.1 DC PHP
  2. 2. @nacin Andrew Nacin andrewnacin.comnacin@wordpress.org
  3. 3. What’s next?
  4. 4. Postformats
  5. 5. Admin bar
  6. 6. Internal linking
  7. 7. Incrementalimprovements
  8. 8. UI & UX (always)
  9. 9. AJAXgoodness
  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. AndTag A and Tag B and Tag C OrCategory A or Category B NotNeither Category A nor B
  14. 14. And tag__and, category__and Or tag__in, category__in Nottag__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 taxonomiesNeither 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. Custompost 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 funbreakingWordPress
  25. 25. Beta 2 willbe released tomorrow

×