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