WordPress 3 and You
Upcoming SlideShare
Loading in...5
×
 

WordPress 3 and You

on

  • 4,355 views

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.

Statistics

Views

Total Views
4,355
Views on SlideShare
2,089
Embed Views
2,266

Actions

Likes
1
Downloads
9
Comments
0

8 Embeds 2,266

http://orenyomtov.com 1853
http://feeds.feedburner.com 203
http://wordcamp2010.wordcampjerusalem.com 131
http://wordcampjerusalem.com 70
http://www.linkedin.com 4
http://translate.googleusercontent.com 3
http://webcache.googleusercontent.com 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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);

WordPress 3 and You WordPress 3 and You Presentation Transcript

  • WordPress 3 and You
    Oren Yomtov
    1
  • Google Reader
    2
  • Stickers
    3
  • Tattoos
    4
  • WordPress Cars
    5
  • Volkswagen = WordPress?
    6
    http://j.mp/aAhHMV
  • Fight the Fake Logo
    7
    http://j.mp/cFMrzT
  • View Source
    8
  • 9
  • Your Own Username & Password
    10
  • New Look (Well.. Kind of)
    11
  • Kubrick is DEAD
    12
  • Twenty Ten
    13
  • Commented Code
    14
  • Custom Header
    15
  • Admin Page
    16
  • 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
  • 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
  • Next you need to write two functions
    add_custom_image_header( ‘header_style’, ‘admin_header_style’ )
    19
    http://j.mp/dcuRSv
  • Function 1
    // gets included in the site header
    function header_style() {
    ?><style type="text/css">
    #header {
    background: url(<?phpheader_image(); ?>);
    }
    </style><?php
    }
    20
  • 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
  • Default Headers
    22
  • 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' )
    )
    ) );
  • Text Preview
    24
  • Text Color
    25
  • Custom Background
    26
  • Admin Page
    27
  • Custom Background Code
    add_custom_background();
    28
    http://j.mp/ b9OJy0
  • Shortlinks
    29
  • Shortlinks Code
    30
    the_shortlink( $text, $title, $before, $after );
    wp_get_shortlink( 123 );
  • 31
  • Menus
    32
  • Menus
    33
  • Menus
    34
  • Menus
    35
  • Menus
    36
  • Menus Code
    37
    register_nav_menus( array(
    'primary' => __( 'Primary Navigation', 'twentyten' ),
    ) );
    http://j.mp/abx5hV
  • Menus Code
    38
    wp_nav_menu(
    array(
    'container_class' => 'menu-header',
    'theme_location' => 'primary‘
    )
    );
    http://j.mp/97n79t
  • Menus Code
    39
    http://j.mp/97n79t
  • Custom Post Types and Taxonomies
    40
  • Default Types
    Post
    Page
    Attachment
    Revision
    Menu
    41
    http://j.mp/d1nqEJ
  • 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
  • Custom Post Type UI
    43
  • Custom Columns
    44
  • Custom Columns
    45
  • Custom Columns
    add_action("manage_posts_custom_column", "my_custom_columns");
    add_filter("manage_edit-podcasts_columns", "my_podcasts_columns");
    46
  • 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
  • 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
  • Displaying Custom Post Types
    query_posts(‘post_type=podcasts’);
    49
    http://j.mp/9S1a6z
  • Displaying Custom Taxonomies
    the_terms($post->ID, 'speakers');
    get_the_terms($post->ID, 'speakers');
    50
    http://j.mp/9S1a6z
    http://j.mp/9Dft6I
  • Multisite
    Yup, back to the browser man.
    Oh, and open an FTP client.
    51
  • 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