31
WordPress 3.1 DC PHP

WordPress 3.1 at DC PHP

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: WordPress 3.1 at DC PHP

WordPress 3.1 DC PHP

Page 2: WordPress 3.1 at DC PHP

@nacin Andrew Nacin

andrewnacin.com [email protected]

Page 3: WordPress 3.1 at DC PHP

What’s next?

Page 4: WordPress 3.1 at DC PHP

Post formats

Page 5: WordPress 3.1 at DC PHP

Admin bar

Page 6: WordPress 3.1 at DC PHP

Internal linking

Page 7: WordPress 3.1 at DC PHP
Page 8: WordPress 3.1 at DC PHP
Page 9: WordPress 3.1 at DC PHP
Page 10: WordPress 3.1 at DC PHP

Incremental improvements

Page 11: WordPress 3.1 at DC PHP

UI & UX (always)

Page 12: WordPress 3.1 at DC PHP

AJAX goodness

Page 13: WordPress 3.1 at DC PHP
Page 14: WordPress 3.1 at DC PHP

Network Admin

Page 15: WordPress 3.1 at DC PHP
Page 16: WordPress 3.1 at DC PHP
Page 17: WordPress 3.1 at DC PHP

Taxonomy queries

Page 18: WordPress 3.1 at DC PHP

query_posts('cat=123&author=456');  

query_posts(array(      'cat'  =>  123,      'author'  =>  456,  )  );  

$myquery['cat']  =  123;  $myquery['author']  =  456;  query_posts(  $myquery  );  

Page 19: WordPress 3.1 at DC PHP

And

Tag A and Tag B and Tag C

Or

Category A or Category B

Not

Neither Category A nor B

Page 20: WordPress 3.1 at DC PHP

And

tag__and, category__and

Or

tag__in, category__in

Not

tag__not_in, category__not_in

Page 21: WordPress 3.1 at DC PHP

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

Page 22: WordPress 3.1 at DC PHP

$myquery['tax_query']  =  array(     array(       'taxonomy'  =>  'category',       'terms'  =>  array('foo'),       'field'  =>  'slug',     ),     array(       'taxonomy'  =>  'post_tag',       'terms'  =>  array('bar'),       'field'  =>  'slug',     ),  );  query_posts(  $myquery  );  

Page 23: WordPress 3.1 at DC PHP

$myquery['tax_query']  =  array(     array(       'taxonomy'  =>  'category',       'terms'  =>  array('foo',  'bar'),       'field'  =>  'slug',       'operator'  =>  'NOT  IN',     ),  );  query_posts(  $myquery  );  

Page 24: WordPress 3.1 at DC PHP

$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  );  

Page 25: WordPress 3.1 at DC PHP

http://otto42.com/81 (required reading)

Page 26: WordPress 3.1 at DC PHP

Custom post types

Page 27: WordPress 3.1 at DC PHP

  register_post_type(  'members',        array(       'labels'  =>  array(         'name'  =>  'Members',         'singular_name'  =>  'Member',         ),       'public'  =>  true,       'show_ui'  =>  true,       'rewrite'  =>  array(         'slug'  =>  'member',         ),       'has_archive'  =>  true,     )  );  

Page 28: WordPress 3.1 at DC PHP

  register_post_type(  'members',        array(       'labels'  =>  array(         'name'  =>  'Members',         'singular_name'  =>  'Member',         ),       'public'  =>  true,       'show_ui'  =>  true,       'rewrite'  =>  array(         'slug'  =>  'member',         ),       'has_archive'  =>  'team',     )  );  

Page 29: WordPress 3.1 at DC PHP

/team/ /member/nacin/

archive-­‐members.php  single-­‐members.php  

Page 30: WordPress 3.1 at DC PHP

Have fun breaking

WordPress

Page 31: WordPress 3.1 at DC PHP

Beta 2 will be released

tomorrow