Your SlideShare is downloading. ×
WordPress 3 and You
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

WordPress 3 and You

3,995
views

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 …

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
3,995
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
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('WP_ALLOW_MULTISITE', true);
  • Transcript

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

    ×