View
2.572
Download
1
Category
Preview:
DESCRIPTION
Modern WordPress has grown far beyond its humble blogging roots, with so many of us using WordPress as a CMS. In this talk I’d like to focus on what I believe is an important (but often overlooked) consideration when rolling out WordPress as a CMS: what is your “content life cycle”? That is, what are the content or entities which must be managed? Who will contribute them, edit them, manage them… and how, and when? I’ll present different technical and design decisions that can be made depending on the particular content life cycle of the project, drawing on my experience various custom WordPress-based sites and applications at MIT. We’ll also touch on how WordPress features like custom post types and taxonomies can make it easy to build out a custom WordPress-based solution.
Citation preview
Consider the Content Life CycleWordPress CMS strategies and code
mitcho (Michael 芳貴 Erlewine)http://mitcho.com, @themitchoJune 4, 2011
http://mitcho.com
@themitcho
Hi! I’m mitcho.
THIS GUY
Slides will be posted later on http://slideshare.net/mitcho
WordPress as a CMS
• Easy to manage• A solid foundation• Faster development cycle• Cohesive structure and navigation• A great community• Plugins and themes you can use
CONTENT
CONTENT
CC-BY-NC-SA flickr.com/photos/bikeracer/6740232/
who contributes/edits/curates/maintains it?
The Content Life Cycle
what
how
is the content?is the metadata?
will it be managed?where is the data?
who
The Content Life Cycle
what
how
is the content?
where
What is the content?
• What are they to you and your visitors?• Not just blog posts and pages...• People, events, locations, times...• What format are they?• Text? Documents? Images? Videos?• A particular data format?
Global ShakespearesMIT Shakespeare Project
http://globalshakespeares.org
Hundreds of productions with video
In development: Shakespeare scripts
• Productions and scripts are semantically distinct• Also have blog posts and pages• Custom Post Types!
Custom Post Types
• WordPress comes with posts and pages• Internally, all called “posts”• Add other “post types”• register_post_type()
Custom Post Types
register_post_type('production', array( 'label' => 'Productions', 'public' => true, 'hierarchical' => false, 'supports' => array('title', 'editor', 'comments'), 'taxonomies' => array('post_tag')));
More info at http://codex.wordpress.org/Post_Types
Custom Post Types
• There are also plugins to administer and tweak custom post types• Plugins can also implement custom post types...
Educational Collaboration SpaceMIT Dept. of Mathematics, NSF
http://ecs.mit.edu
File Groupshttp://wordpress.org/extend/plugins/file-groups/
File Groupshttp://wordpress.org/extend/plugins/file-groups/
who
The Content Life Cycle
what
how
is the content?is the metadata?
where
What is the metadata?
• Define your metadata• Aim for structured data• Structured data can be organized and reused neatly
Rich metadata on each production
Metadata in WordPress
• What do you want to group by?• This type of “organizational metadata”:• Custom taxonomies• Just like tags and categories for posts
Custom Taxonomies
register_taxonomy( 'region', array('production','post'), array( 'hierarchical' => true, 'label' => 'Region', ) );
More info at http://codex.wordpress.org/Taxonomies
Metadata in WordPress• Flags, properties not used for organization:• Postmeta! As seen in Custom Fields• “bits of information specific to the post item itself”
• Learn more at http://codex.wordpress.org/Custom_Fields• http://ottopress.com/2011/when-to-not-use-a-custom-taxonomy/
who contributes/edits/curates/maintains it?
The Content Life Cycle
what
how
is the content?is the metadata?
where
Consider your audience
• Your audience is not just your visitors!• Content management must be sustainable• Whose responsibility will it be?• What is their technical background?
Permissions
• Who submits, publishes, edits?• Learn more: http://codex.wordpress.org/Roles_and_Capabilities• Can be customized via plugins or code• With Custom Post Types, can be controlled per-post-type.
Content from visitors
• Visitors can contribute content too• Gravity Forms plugin lets you create forms and have submissions become posts or trigger other actions
who contributes/edits/curates/maintains it?
The Content Life Cycle
what
how
is the content?is the metadata?
will it be managed?where
The C and the M in CMS
• Think about that edit screen• Simplify and consolidate• Think about common admin tasks
Rich metadata on each production
Production metadata consolidated into one meta boxInfo: codex.wordpress.org/Function_Reference/add_meta_box
Simplify, simplify, simplify
• Simplify the edit screen• You can hide things by default• Every meta box has an ID• It’s literally the id attribute...
Simplify, simplify, simplify
add_filter( 'default_hidden_meta_boxes', 'hide_some_boxes' );
function hide_some_boxes( $hidden ) { $hidden[] = 'myboxid'; $hidden[] = 'anotherboxid'; //... return $hidden;}
Simplify, simplify, simplify
New users will see less meta boxesBring them back from the Screen Options
Support familiar tools (?)
• What tools are the maintainers used to?• How do they manage content now?• Can it be integrated into WordPress?
Shakespeare: some video datasubmitted by researchers in Excel format
Solution: a simple (custom) CSV file importer
WARNING:
• This is a balancing act• Moving to WordPress can be a great way to build new sustainable habits• Not all traditions are constructive
who contributes/edits/curates/maintains it?
The Content Life Cycle
what
how
is the content?is the metadata?
will it be managed?where is the data?
WordPress-external data
• The core content data need not even be stored in WordPress proper• The benefits of WordPress: tags, categories, comments, etc. for free• But not without tradeoffs...
Edgerton Digital CollectionsMIT Museum and MIT Edgerton Centerhttp://edgerton-digital-collections.org
12000 photos, 8000 notebook pages
All assets from the MIT Museum databasein MIMSY, a commercial collection management app
External data sources
• MIMSY has a web API for data retrieval• Custom post type for museum assets• Specify ID, get image and metadata from museum DB live• Site-specific metadata (comments, tags) in WordPress
In development: Shakespeare scripts
Scripts are XML files, not content text in WordPressNo editor needed
Registering scripts
register_post_type('script', array( 'label' => 'Scripts', 'public' => true, 'hierarchical' => false, 'supports' => array('title', 'xmldoc', 'comments'), 'taxonomies' => array('post_tag')));
XML Documents with XSLT stylesheetswordpress.org/extend/plugins/xml-documents/
instead of ‘editor’
Data considerations
• Performance• XSLT rendering and external API calls are costly• Cache site of front-end• Sync content to WordPress?• Requires custom search integration
Integrated search also uses external MIMSY DB API
kick-ass CMS applications
CONTENT
CC-BY-NC-SA flickr.com/photos/bikeracer/6740232/
who contributes/edits/curates/maintains it?
The Content Life Cycle
what
how
is the content?is the metadata?
will it be managed?where is the data?
Thank you!Questions?
Slides will be up on http://slideshare.net/mitcho
mitcho (Michael 芳貴 Erlewine)mitcho.com; @themitcho
Recommended