0
WordPress 3 and You<br />Oren Yomtov<br />1<br />
Google Reader<br />2<br />
Stickers<br />3<br />
Tattoos<br />4<br />
WordPress Cars<br />5<br />
Volkswagen = WordPress?<br />6<br />http://j.mp/aAhHMV<br />
Fight the Fake Logo<br />7<br />http://j.mp/cFMrzT<br />
View Source<br />8<br />
9<br />
Your Own Username & Password<br />10<br />
New Look (Well.. Kind of)<br />11<br />
Kubrick is DEAD<br />12<br />
Twenty Ten<br />13<br />
Commented Code<br />14<br />
Custom Header<br />15<br />
Admin Page<br />16<br />
Four constants must be defined<br />define('HEADER_IMAGE', ‘%s/images/default_header.jpg');<br />define('HEADER_IMAGE_WIDT...
If you don't want to allow changing the header text color, add:<br />define('NO_HEADER_TEXT', true );<br />Then change the...
Next you need to write two functions<br />add_custom_image_header( ‘header_style’, ‘admin_header_style’ )<br />19<br />htt...
Function 1<br />// gets included in the site header<br />function header_style() {<br />    ?><style type="text/css"><br /...
Function 2<br />// gets included in the admin header<br />function admin_header_style() {<br />    ?><style type="text/css...
Default Headers<br />22<br />
Default Headers<br />23<br />register_default_headers( array(<br />		'berries' => array(<br />			'url' => '%s/images/heade...
Text Preview<br />24<br />
Text Color<br />25<br />
Custom Background<br />26<br />
Admin Page<br />27<br />
Custom Background Code<br />add_custom_background(); <br />28<br />http://j.mp/ b9OJy0<br />
Shortlinks<br />29<br />
Shortlinks Code<br />30<br />the_shortlink( $text, $title, $before, $after );<br />wp_get_shortlink( 123 );<br />
31<br />
Menus<br />32<br />
Menus<br />33<br />
Menus<br />34<br />
Menus<br />35<br />
Menus<br />36<br />
Menus Code<br />37<br />register_nav_menus( array(<br />		'primary' => __( 'Primary Navigation', 'twentyten' ),<br />) );<...
Menus Code<br />38<br />wp_nav_menu(<br />	array(<br />		'container_class' => 'menu-header',<br />		'theme_location' => 'p...
Menus Code<br />39<br />http://j.mp/97n79t<br />
Custom Post Types and Taxonomies<br />40<br />
Default Types<br />Post<br />Page<br />Attachment<br />Revision<br />Menu<br />41<br />http://j.mp/d1nqEJ<br />
The Ugly Way<br />register_post_type('podcasts',<br />	array(<br />		'label' => 'Podcasts',<br />		'public' => true,<br />...
Custom Post Type UI<br />43<br />
Custom Columns<br />44<br />
Custom Columns<br />45<br />
Custom Columns<br />add_action("manage_posts_custom_column", "my_custom_columns");<br />add_filter("manage_edit-podcasts_c...
my_podcasts_columns<br />function my_podcasts_columns($columns)<br />{<br />	$columns = array(<br />		"cb" => "<input type...
my_custom_columns<br />function my_custom_columns($column)<br />{<br />	global $post;<br />	if ("description" == $column)<...
Displaying Custom Post Types<br />query_posts(‘post_type=podcasts’);<br />49<br />http://j.mp/9S1a6z<br />
Displaying Custom Taxonomies<br />the_terms($post->ID, 'speakers');<br />get_the_terms($post->ID, 'speakers');<br />50<br ...
Multisite<br />Yup, back to the browser man.<br />Oh, and open an FTP client.<br />51<br />
This is The Last Slide<br />Thank you for listening!<br />You should look me up on Linkedin, Facebook & Twitter (@orenyomt...
Upcoming SlideShare
Loading in...5
×

WordPress 3 and You

4,025

Published on

WordPress 3 has brought with it lots of changes and improvements to the already wonderful system we are already familiar with. This lecture will review all the changes and explain the best way to utilize them and when. This is important information for any developer who doesn’t want to be left in the dust as WordPress keeps going forwards.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,025
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Do a live demonstration of changing the header image
  • Do live demonstration of turning the background black
  • Talk A LOT
  • define(&apos;WP_ALLOW_MULTISITE&apos;, true);
  • Transcript of "WordPress 3 and You"

    1. 1. WordPress 3 and You<br />Oren Yomtov<br />1<br />
    2. 2. Google Reader<br />2<br />
    3. 3. Stickers<br />3<br />
    4. 4. Tattoos<br />4<br />
    5. 5. WordPress Cars<br />5<br />
    6. 6. Volkswagen = WordPress?<br />6<br />http://j.mp/aAhHMV<br />
    7. 7. Fight the Fake Logo<br />7<br />http://j.mp/cFMrzT<br />
    8. 8. View Source<br />8<br />
    9. 9. 9<br />
    10. 10. Your Own Username & Password<br />10<br />
    11. 11. New Look (Well.. Kind of)<br />11<br />
    12. 12. Kubrick is DEAD<br />12<br />
    13. 13. Twenty Ten<br />13<br />
    14. 14. Commented Code<br />14<br />
    15. 15. Custom Header<br />15<br />
    16. 16. Admin Page<br />16<br />
    17. 17. Four constants must be defined<br />define('HEADER_IMAGE', ‘%s/images/default_header.jpg');<br />define('HEADER_IMAGE_WIDTH', 775);<br />define('HEADER_IMAGE_HEIGHT', 200);<br />define('HEADER_TEXTCOLOR', 'ffffff');<br />17<br />
    18. 18. If you don't want to allow changing the header text color, add:<br />define('NO_HEADER_TEXT', true );<br />Then change the first definition to:<br />define('HEADER_TEXTCOLOR', '');<br />18<br />
    19. 19. Next you need to write two functions<br />add_custom_image_header( ‘header_style’, ‘admin_header_style’ )<br />19<br />http://j.mp/dcuRSv<br />
    20. 20. Function 1<br />// gets included in the site header<br />function header_style() {<br /> ?><style type="text/css"><br /> #header {<br /> background: url(<?phpheader_image(); ?>);<br /> }<br /> </style><?php<br />}<br />20<br />
    21. 21. Function 2<br />// gets included in the admin header<br />function admin_header_style() {<br /> ?><style type="text/css"><br /> #headimg {<br /> width: <?php echo HEADER_IMAGE_WIDTH; ?>px;<br /> height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;<br /> }<br /> </style><?php<br />}<br />21<br />
    22. 22. Default Headers<br />22<br />
    23. 23. Default Headers<br />23<br />register_default_headers( array(<br /> 'berries' => array(<br /> 'url' => '%s/images/headers/berries.jpg',<br /> 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg',<br /> /* translators: header image description */<br /> 'description' => __( 'Berries', 'twentyten' )<br /> )<br />) );<br />
    24. 24. Text Preview<br />24<br />
    25. 25. Text Color<br />25<br />
    26. 26. Custom Background<br />26<br />
    27. 27. Admin Page<br />27<br />
    28. 28. Custom Background Code<br />add_custom_background(); <br />28<br />http://j.mp/ b9OJy0<br />
    29. 29. Shortlinks<br />29<br />
    30. 30. Shortlinks Code<br />30<br />the_shortlink( $text, $title, $before, $after );<br />wp_get_shortlink( 123 );<br />
    31. 31. 31<br />
    32. 32. Menus<br />32<br />
    33. 33. Menus<br />33<br />
    34. 34. Menus<br />34<br />
    35. 35. Menus<br />35<br />
    36. 36. Menus<br />36<br />
    37. 37. Menus Code<br />37<br />register_nav_menus( array(<br /> 'primary' => __( 'Primary Navigation', 'twentyten' ),<br />) );<br />http://j.mp/abx5hV<br />
    38. 38. Menus Code<br />38<br />wp_nav_menu(<br /> array(<br /> 'container_class' => 'menu-header',<br /> 'theme_location' => 'primary‘<br /> )<br />);<br />http://j.mp/97n79t<br />
    39. 39. Menus Code<br />39<br />http://j.mp/97n79t<br />
    40. 40. Custom Post Types and Taxonomies<br />40<br />
    41. 41. Default Types<br />Post<br />Page<br />Attachment<br />Revision<br />Menu<br />41<br />http://j.mp/d1nqEJ<br />
    42. 42. The Ugly Way<br />register_post_type('podcasts',<br /> array(<br /> 'label' => 'Podcasts',<br /> 'public' => true,<br /> 'show_ui' => true,<br /> 'capability_type' => 'post',<br /> 'hierarchical' => false,<br /> 'rewrite' => array('slug' => ‘podcasts'),<br /> 'query_var' => true,<br /> 'supports' => array('title','editor',)<br /> )<br />);<br />42<br />
    43. 43. Custom Post Type UI<br />43<br />
    44. 44. Custom Columns<br />44<br />
    45. 45. Custom Columns<br />45<br />
    46. 46. Custom Columns<br />add_action("manage_posts_custom_column", "my_custom_columns");<br />add_filter("manage_edit-podcasts_columns", "my_podcasts_columns");<br />46<br />
    47. 47. my_podcasts_columns<br />function my_podcasts_columns($columns)<br />{<br /> $columns = array(<br /> "cb" => "<input type="checkbox" />",<br /> "title" => "Podcast Title",<br /> "description" => "Description",<br /> "speakers" => "Speakers",<br /> "comments" => 'Comments'<br /> );<br /> return $columns;<br />}<br />47<br />
    48. 48. my_custom_columns<br />function my_custom_columns($column)<br />{<br /> global $post;<br /> if ("description" == $column)<br /> echo $post->post_content;<br />elseif ("speakers" == $column)<br />the_terms($post->ID, 'speakers');<br />}<br />48<br />
    49. 49. Displaying Custom Post Types<br />query_posts(‘post_type=podcasts’);<br />49<br />http://j.mp/9S1a6z<br />
    50. 50. Displaying Custom Taxonomies<br />the_terms($post->ID, 'speakers');<br />get_the_terms($post->ID, 'speakers');<br />50<br />http://j.mp/9S1a6z<br />http://j.mp/9Dft6I<br />
    51. 51. Multisite<br />Yup, back to the browser man.<br />Oh, and open an FTP client.<br />51<br />
    52. 52. This is The Last Slide<br />Thank you for listening!<br />You should look me up on Linkedin, Facebook & Twitter (@orenyomtov)<br />You may soon download this presentation from orenyomtov.com<br />52<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×