Skip to content

Content Type: Portfolio

Justin Tadlock edited this page Jul 10, 2015 · 16 revisions

This is standard for portfolios and how plugins should handle them. This standard was discussed and decided upon via #2 Portfolio Standard.

You can find the most current standard in code form here: https://github.com/justintadlock/content-type-standards/tree/master/portfolio

Post type

  • portfolio_project

Taxonomies

Project Category

This is a general-purpose, hierarchical taxonomy for portfolio projects.

  • Taxonomy name: portfolio_category

Project Tag

This is a general-purpose, non-hierarchical taxonomy for portfolio projects.

  • Taxonomy name: portfolio_tag

Post Format

Plugins may optionally include support for core WP's post format taxonomy.

  • Taxonomy name: post_format

Metadata

Note that all metadata doesn't necessarily have to be used by all plugins. This is simply a standard so that plugin authors will know exactly how to name and format their metadata.

Featured Image

Plugins may choose to enable the WordPress featured image functionality to allow the user to upload a featured image for their project. Plugins should use core WP functionality for handling this feature.

  • Meta key: _thumbnail_id
  • Meta value: 100 (image attachment ID)

Project URL

This meta key represents a URL to another Web site or page for the particular project.

  • Meta key: url
  • Meta value: http://example.com (URL string)

Project Client

This meta key holds the name of the client (person, business, etc.) for the project.

  • Meta key: client
  • Meta value: John Doe (text string)

Project Start Date

Date the project started. Follow date/time metadata standard.

  • Meta key: start_date
  • Meta value: 0000-00-00 (year-month-day)

Project End Date

Date the project was completed. Follow date/time metadata standard.

  • Meta key: end_date
  • Meta value: 0000-00-00 (year-month-day)

Project Location

Location of the project if it exists.

  • Meta key: location
  • Meta value: City, State/Province, Country (text string)

Other Data

Project Title

Portfolio project titles should be saved in the standard post_title field.

Project Content

Portfolio project content should be saved in the standard post_content field. This may include text, images, and/or other media.

Project Excerpt

Plugins may optionally add support for excerpts. This data would be saved in the standard post_excerpt field.

WordPress Plugins

See plugins which follow this standard.