23. Post Type Features
post type features
title, editor, author, thumbnail, excerpt, trackbacks,
post custom-fields, comments, revisions, post-formats
title, editor, author, thumbnail, page-attributes,
page custom-fields, comments, revisions
attachment comments
default title, editor
24. Check for features
if if ( 'script' == $post_type
// ( 'script' == $post_type ) )
if ( post_type_supports( $post_type, 'xmldoc' ) )
26. metadata in WordPress
{
taxonomy
organizational
search, sorting
can be hierarchical
post meta
non-organizational
specific to the
content item
like tags, categories like custom fields
32. All assets from the MIT Museum database
in MIMSY, a commercial collection management app
33. Edgerton
• Custom post type for museum assets
• Specify ID, get image and metadata
from museum DB
• Site-specific metadata (comments,
tags) in WordPress
34. Remote data
• Hit external APIs with wp_remote_request()
and friends
• Cache results in Post Meta, Object Cache,
Transients, as appropriate
35. Search integration
• Simple trick: put searchable text
versions of custom content in
post_content
• Roll out a separate search
36. 1. Content
what is the content?
is the metadata?
where is the data?
48. Insert the post
$id = wp_insert_post( array(
'post_title' => 'WP Hamlet',
'post_status' => 'publish',
'post_type' => 'production',
'tax_input' => array(
'play' => 'hamlet',
'director' => 'matt-mullenweg',
'language' => 'php' )
) );
Add post meta separately.
49. NING:
WA R
• This is a balancing act
• Moving to WordPress can be a great
way to build new sustainable habits
• Not all traditions are constructive
50. what is the content?
is the metadata?
where is the data?
who contributes/edits/
curates/maintains it?
how will it be managed?