SlideShare a Scribd company logo
Understanding the Ins and 
Outs of WordPress Metadata 
Austin WordPress Meetup 
Tuesday, Nov. 25, 2014 
Presenter: Nick Batik 
@nick_batik 
http://HandsOnWP.com
What is Meta Data?
Metadata is "data about data". 
There are two (metadata types): 
• structural metadata, about the design and 
specification of data structures or "data about the 
containers of data"; 
• and descriptive metadata about individual instances 
of application data or the data content.
Huh?
Let’s Look at Some 
Examples 
(It will make more sense)
Books 
• Title 
• Author 
• Publisher 
• Date of Publication 
• Number of pages 
• ISBN
Business Directory 
• Name of business 
• Description 
• Address 
• Phone 
• Owner 
• Hours of operation
Photography 
• Resolution 
• Exposure time 
• F-stop 
• Focal length 
• Aperture 
• Pixel dimensions
Event 
• Location 
• Date 
• Performers 
• Description 
• Where to get tickets
Oh! 
So meta data is information about the 
book, business, photograph, and event!
Adding Metadata to 
WordPress
Custom Post Types 
The “container” for your metadata 
Example: 
• Books 
• Photo Portfolio 
• Business Directory 
• Events
Custom Fields 
The metadata for a Post Type 
Example: 
• Title 
• Author 
• Publisher 
• Date of Publication 
• Number of pages 
• ISBN
Custom Taxonomies 
Categories specific to a Post Type 
Example, a “genre” taxonomy for a book: 
• Science Fiction 
• Drama 
• Romance 
• Mystery 
• Western
Post Types can have 
multiple taxonomies
“Books” could also have a taxonomy of “binding”: 
• hard cover 
• paperback
…and “Publisher”: 
• Addison-Wesley 
• Wiley 
• Prentice Hall 
• Bantam
Field Formats 
Choosing how each field should be edited
Text Field 
A single line of text
Text Area
WYSIWYG Text Area
True/False 
Check for true, uncheck for false
Checkbox 
Select as many as you want
Radio Button 
Select only one from the list
Drop-down List
File or Image
Embed content 
Such as videos, audio, slide 
shows, etc.
Link to other pages
Color or Date Pickers
WordPress Metadata Plugins 
• Advanced Custom Fields 
https://wordpress.org/plugins/advanced-custom-fields/ 
• Types - Custom Fields and Custom Post Types 
Management 
https://wordpress.org/plugins/types/ 
• Pods - Custom Content Types and Fields 
https://wordpress.org/plugins/pods/
Creating Custom Post Types 
• Labels 
• Icons 
• Visibility 
• Sections supported 
• Roles & capabilities 
• Menu position
Demo
add_action( 'init', 'codex_book_init' ); 
/** 
* Register a book post type. 
* 
* @link http://codex.wordpress.org/Function_Reference/register_post_type 
*/ 
function codex_book_init() { 
Doing it with code 
$labels = array( 
'name' => 'Books', 
'singular_name' =>’Book', 
'menu_name' =>'Books', 
'name_admin_bar' => 'Book', 
'add_new' => 'Add New', 
'add_new_item' => 'Add New Book', 
'new_item' => 'New Book', 
'edit_item' => 'Edit Book', 
'view_item' => 'View Book', 
'all_items' => 'All Books', 
'search_items' ‘Search Books', 
'parent_item_colon' => 'Parent Books:', 
'not_found' => 'No books found.', 
'not_found_in_trash' => No books found in Trash.' 
); 
$args = array( 
'labels' => $labels, 
'public' => true, 
'publicly_queryable' => true, 
'show_ui' => true, 
'show_in_menu' => true, 
'query_var' => true, 
'rewrite' => array( 'slug' => 'book' ), 
'capability_type' => 'post', 
'has_archive' => true, 
'hierarchical' => false,
$args = array( 
'labels' => $labels, 
'public' => true, 
'publicly_queryable' => true, 
'show_ui' => true, 
'show_in_menu' => true, 
'query_var' => true, 
'rewrite' => array( 'slug' => 'book' ), 
'capability_type' => 'post', 
'has_archive' => true, 
'hierarchical' => false, 
'menu_position' => null, 
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) 
); 
register_post_type( 'book', $args ); 
}
Post Type Supports 
Default: title and editor 
• 'title' 
• 'editor' (content) 
• 'author' 
• 'thumbnail' (featured image, current theme must also support post-thumbnails) 
• 'excerpt' 
• 'trackbacks' 
• 'custom-fields' 
• 'comments' (also will see comment count balloon on edit screen) 
• 'revisions' (will store revisions) 
• 'page-attributes' (menu order, hierarchical must be true to show Parent option) 
• 'post-formats' add post formats, see Post Formats
Post Type Menu 
Position 
The position in the menu order the post type should appear. show_in_menu must be true. 
Default: null - defaults to below Comments 
• 5 - below Posts 
• 10 - below Media 
• 15 - below Links 
• 20 - below Pages 
• 25 - below comments 
• 60 - below first separator 
• 65 - below Plugins 
• 70 - below Users 
• 75 - below Tools 
• 80 - below Settings 
• 100 - below second separator
Demo 
Creating a Custom Post Type with Types plugin
Demo 
Creating a Custom Post Type with PODS
Demo 
Adding Custom Fields to “Books” with Types
Demo 
Adding Custom Meta to Events with PODS, Types, and 
Advanced Custom Fields (ACF)
Demo 
A quick demo of how to do this in code…
Understanding the ins and outs of word press metadata

More Related Content

Similar to Understanding the ins and outs of word press metadata

Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to ChangesBenefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
Alex Nguyen
 
WordPress 3 Custom Post Types
WordPress 3 Custom Post TypesWordPress 3 Custom Post Types
WordPress 3 Custom Post Types
Dave Zille
 
The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012
Stephanie Leary
 
S01 e01 schema-design
S01 e01 schema-designS01 e01 schema-design
S01 e01 schema-design
MongoDB
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
Antonio Peric-Mazar
 
WP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post TypesWP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post Types
Joe Querin
 
Using Wordpress as a Content Management System
Using Wordpress as a Content Management SystemUsing Wordpress as a Content Management System
Using Wordpress as a Content Management System
Calvin Robertson
 
OSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialOSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB Tutorial
Steven Francia
 
MongoDB at ZPUGDC
MongoDB at ZPUGDCMongoDB at ZPUGDC
MongoDB at ZPUGDC
Mike Dirolf
 
Django introduction @ UGent
Django introduction @ UGentDjango introduction @ UGent
Django introduction @ UGent
kevinvw
 
Custom post types - WordPress
Custom post types - WordPressCustom post types - WordPress
Custom post types - WordPress
keithdevon
 
Custom Post Types and Meta Fields
Custom Post Types and Meta FieldsCustom Post Types and Meta Fields
Custom Post Types and Meta Fields
Liton Arefin
 
CUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsCUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension Points
Alfresco Software
 
SharePoint goes Microsoft Graph
SharePoint goes Microsoft GraphSharePoint goes Microsoft Graph
SharePoint goes Microsoft Graph
Markus Moeller
 
Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012
hungarianhc
 
Web design training , Web Design Training In Kolkata
Web design training , Web Design Training In KolkataWeb design training , Web Design Training In Kolkata
Web design training , Web Design Training In Kolkata
W3webschool
 
Webinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting StartedWebinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting Started
MongoDB
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
RTigger
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)
Tarunsingh198
 
Retail referencearchitecture productcatalog
Retail referencearchitecture productcatalogRetail referencearchitecture productcatalog
Retail referencearchitecture productcatalog
MongoDB
 

Similar to Understanding the ins and outs of word press metadata (20)

Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to ChangesBenefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
 
WordPress 3 Custom Post Types
WordPress 3 Custom Post TypesWordPress 3 Custom Post Types
WordPress 3 Custom Post Types
 
The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012
 
S01 e01 schema-design
S01 e01 schema-designS01 e01 schema-design
S01 e01 schema-design
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
WP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post TypesWP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post Types
 
Using Wordpress as a Content Management System
Using Wordpress as a Content Management SystemUsing Wordpress as a Content Management System
Using Wordpress as a Content Management System
 
OSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialOSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB Tutorial
 
MongoDB at ZPUGDC
MongoDB at ZPUGDCMongoDB at ZPUGDC
MongoDB at ZPUGDC
 
Django introduction @ UGent
Django introduction @ UGentDjango introduction @ UGent
Django introduction @ UGent
 
Custom post types - WordPress
Custom post types - WordPressCustom post types - WordPress
Custom post types - WordPress
 
Custom Post Types and Meta Fields
Custom Post Types and Meta FieldsCustom Post Types and Meta Fields
Custom Post Types and Meta Fields
 
CUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsCUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension Points
 
SharePoint goes Microsoft Graph
SharePoint goes Microsoft GraphSharePoint goes Microsoft Graph
SharePoint goes Microsoft Graph
 
Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012
 
Web design training , Web Design Training In Kolkata
Web design training , Web Design Training In KolkataWeb design training , Web Design Training In Kolkata
Web design training , Web Design Training In Kolkata
 
Webinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting StartedWebinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting Started
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)
 
Retail referencearchitecture productcatalog
Retail referencearchitecture productcatalogRetail referencearchitecture productcatalog
Retail referencearchitecture productcatalog
 

Recently uploaded

Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
saathvikreddy2003
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
bseovas
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
Toptal Tech
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
ysasp1
 
Azure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdfAzure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdf
AanSulistiyo
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
bseovas
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
wolfsoftcompanyco
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
uehowe
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 

Recently uploaded (20)

Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
 
Azure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdfAzure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdf
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 

Understanding the ins and outs of word press metadata

  • 1. Understanding the Ins and Outs of WordPress Metadata Austin WordPress Meetup Tuesday, Nov. 25, 2014 Presenter: Nick Batik @nick_batik http://HandsOnWP.com
  • 2. What is Meta Data?
  • 3. Metadata is "data about data". There are two (metadata types): • structural metadata, about the design and specification of data structures or "data about the containers of data"; • and descriptive metadata about individual instances of application data or the data content.
  • 5. Let’s Look at Some Examples (It will make more sense)
  • 6. Books • Title • Author • Publisher • Date of Publication • Number of pages • ISBN
  • 7. Business Directory • Name of business • Description • Address • Phone • Owner • Hours of operation
  • 8. Photography • Resolution • Exposure time • F-stop • Focal length • Aperture • Pixel dimensions
  • 9. Event • Location • Date • Performers • Description • Where to get tickets
  • 10. Oh! So meta data is information about the book, business, photograph, and event!
  • 11. Adding Metadata to WordPress
  • 12. Custom Post Types The “container” for your metadata Example: • Books • Photo Portfolio • Business Directory • Events
  • 13. Custom Fields The metadata for a Post Type Example: • Title • Author • Publisher • Date of Publication • Number of pages • ISBN
  • 14. Custom Taxonomies Categories specific to a Post Type Example, a “genre” taxonomy for a book: • Science Fiction • Drama • Romance • Mystery • Western
  • 15. Post Types can have multiple taxonomies
  • 16. “Books” could also have a taxonomy of “binding”: • hard cover • paperback
  • 17. …and “Publisher”: • Addison-Wesley • Wiley • Prentice Hall • Bantam
  • 18. Field Formats Choosing how each field should be edited
  • 19. Text Field A single line of text
  • 22. True/False Check for true, uncheck for false
  • 23. Checkbox Select as many as you want
  • 24. Radio Button Select only one from the list
  • 27. Embed content Such as videos, audio, slide shows, etc.
  • 28. Link to other pages
  • 29. Color or Date Pickers
  • 30. WordPress Metadata Plugins • Advanced Custom Fields https://wordpress.org/plugins/advanced-custom-fields/ • Types - Custom Fields and Custom Post Types Management https://wordpress.org/plugins/types/ • Pods - Custom Content Types and Fields https://wordpress.org/plugins/pods/
  • 31. Creating Custom Post Types • Labels • Icons • Visibility • Sections supported • Roles & capabilities • Menu position
  • 32. Demo
  • 33. add_action( 'init', 'codex_book_init' ); /** * Register a book post type. * * @link http://codex.wordpress.org/Function_Reference/register_post_type */ function codex_book_init() { Doing it with code $labels = array( 'name' => 'Books', 'singular_name' =>’Book', 'menu_name' =>'Books', 'name_admin_bar' => 'Book', 'add_new' => 'Add New', 'add_new_item' => 'Add New Book', 'new_item' => 'New Book', 'edit_item' => 'Edit Book', 'view_item' => 'View Book', 'all_items' => 'All Books', 'search_items' ‘Search Books', 'parent_item_colon' => 'Parent Books:', 'not_found' => 'No books found.', 'not_found_in_trash' => No books found in Trash.' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'book' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false,
  • 34. $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'book' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) ); register_post_type( 'book', $args ); }
  • 35. Post Type Supports Default: title and editor • 'title' • 'editor' (content) • 'author' • 'thumbnail' (featured image, current theme must also support post-thumbnails) • 'excerpt' • 'trackbacks' • 'custom-fields' • 'comments' (also will see comment count balloon on edit screen) • 'revisions' (will store revisions) • 'page-attributes' (menu order, hierarchical must be true to show Parent option) • 'post-formats' add post formats, see Post Formats
  • 36. Post Type Menu Position The position in the menu order the post type should appear. show_in_menu must be true. Default: null - defaults to below Comments • 5 - below Posts • 10 - below Media • 15 - below Links • 20 - below Pages • 25 - below comments • 60 - below first separator • 65 - below Plugins • 70 - below Users • 75 - below Tools • 80 - below Settings • 100 - below second separator
  • 37. Demo Creating a Custom Post Type with Types plugin
  • 38.
  • 39. Demo Creating a Custom Post Type with PODS
  • 40.
  • 41. Demo Adding Custom Fields to “Books” with Types
  • 42.
  • 43. Demo Adding Custom Meta to Events with PODS, Types, and Advanced Custom Fields (ACF)
  • 44.
  • 45.
  • 46.
  • 47. Demo A quick demo of how to do this in code…