SlideShare une entreprise Scribd logo
1  sur  70
Télécharger pour lire hors ligne
Content-Driven
WordPress Development
Stephanie Eckles @5t3ph thinkdobecreate.com
WordPress Is:
• An extremely flexible CMS
• An easily modifiable database
• A strong foundation to jump-start projects
• A growing app platform
• ...Sometimes a blog
Can WordPress
do X?
Presentation Goals
• See how a content-first development
approach looks
• Review how WordPress displays and relates
content
• Design a structure that supports content-
first development
Customizing WordPress
requires a
content-first
approach
Benefits of
Content-First Development
• More productive discussions with
content writers
• Better understanding of the site
architecture by designers
• Speedier sites
• More efficient queries
• Less confusion for the end user
What is the relationship of
this content to the rest of
the project?
A Simple Example:
Blog Considerations
• Categories
• Tags
• Handle multiple authors
• Have related sidebar content
For successful
content-first development,
all possibilities for
content relationships
are identified up-front.
What events would
cause this piece of
content to be
modified?
Dynamic Sidebar
• Dynamic sidebar content will be related
posts widget
• Related posts are based on matching the
category
• They are ordered with the newest first,
displaying up to 5
• They should exclude the current post
Content-driven
development means being
very purposeful in
choosing the mechanisms
for data entry.
Typical Marketing Website Needs
• Unique front page
• Non-central blog page
• Multi-level navigation
• Multiple menus (header, footer, sitemap)
• Resources section with press releases,
case studies, and white papers
• Lead generation forms
• Landing pages for services
• Search
How WordPress
Handles Content
Index vs. Home vs.
Front-Page
Remnants from
HTML Development
• index.html - default page rendered
- www.site.com/ > loads > www.site.com/index.html
• "Index" equates both "Home" and "Front
Page" for the root site
WordPress: Index, Home,
and Front Page
= 3 Different Use Cases
index.php
• The lowest-tier default template used if no
unique templates exist above it in the template
hierarchy (we'll circle back to that)
• Can be both the home and front page IF there
is no intention to make the front page unique
- Or if you want to deal with a crazy mess of
conditionals
home.php
• Relic of WordPress being a largely blog
platform
• Template for posts if either:
1. Front page settings of site is set to show latest
posts
2. Blog is non-central to the site's focus (i.e. not the
"home" page)
• Then set a different published Page as the "Posts"
page under Settings > Reading
front-page.php
• If this exists in a theme, will be first
priority to be used to display the site's front
page, regardless if latests posts or a static page
is chosen
• "Front page" static page can be defined under
Settings > Reading
Front Page Dictated
By Site's Purpose
WordPress As A Blog
• Create a unique home.php
• Leave default Reading settings to
display latest posts
WordPress For A Business
• Create unique front-page.php
• Publish a "Home" page
• Define the "Home" page as the front page
under Reading settings
WordPress For A
Business With a Blog
• Create unique front-page.php and unique
home.php
• Publish a "Home" page
• Publish a "Blog" page
• Define the "Home" page as the front page
under Reading settings
• Define the "Blog" page as the posts page
under Reading settings
#DoingItWrong
• Not define the front and posts pages
• Create your "home" page template on index.php
• Create a custom page template and write an
unnecessary query to create a paginated blog
template
Any Questions on
Index vs. Home vs.
Front Page?
Posts v. Pages
Posts
• Date-based
• Use categories
• Displayed in RSS feed
• Generally for blog or
news articles
Template hierarchy in
priority order:
- single-posttype.php
(we'll get to that)
- single.php
- index.php
Pages
• Generally static
• No categories or
tags
• Hierarchal (can
define parent and
child relationships)
• Usually top-level
content for non-
blog focused sites
Template hierarchy in
priority order:
- Custom template chosen
from Page Attributes
- page-pageslug.php
- page-id.php
- page.php
- index.php
Custom Meta
Benefits of
Custom Meta Data
• Can be any key/value pair
• Can be displayed automatically in a way
dictated by the theme
• Can be used to affect the main query
Greatest Benefit of
Custom Meta Data
• Can be entered via a custom-created meta
box on the edit screen of any post type
• Allows for precise data entry due to
constraints of the form field chosen
• Finer control over display or use
information within the theme
- Example:A meta box for a call-to-action
button would have a text field for the url and a
text field for the button text
Custom Post Types
Custom Post Type Benefits
• Customize URL structure
- site.com/**posttype**/post-slug/
• Can be excluded from search and nav menu selection
- Useful for: using entries as slide content in a carousel
• Can prevent inclusion in front-end queries
- Useful for: a documentation index displayed only in admin
Custom Post Type Benefits
• Limit UI elements on edit page
- Useful for: only showing the title, excerpt, and featured
image to create an image carousel with non-html captions
• Can define menu placement and structure for admin
- Useful for: grouping related CPTs, such as for a Resources
section
• More clearly defined area to edit particular content
- Meaning less calls and emails of "how do I change this?
CPT Location:
Theme or Plugin?
Marketing Site Example
• Resources Section
- Press releases
- Case studies
- White papers
Content-First Considerations:
• What information is related to each unique
content entry
• What is displayed for each entry on the
main resources page
• What is displayed on the single view for
each entry
• Special circumstances for viewing content
• How to make the content easily
maintainable by the end user
Content Considerations
For Each Type
• Title
• Full Content / Description
• Document download
• Special Content Case
- Newsletter Issue Archives
Resource PageView
Considerations
• Title
• Excerpt
• "Read More" link
Single ResourceView
Considerations
• Title
• Full Content
• Access to document
download
- Button for direct
download
• List of other recent
resources of same
type
Preparing for Content
• Determine content entry UI elements
- Title
- Editor
- Excerpt
- Meta Box
• Upload field for a document download
- Unique Feature
• A way to link "Issues" for the newsletter CPT
Preparing for Content
• Setup a CPT for each resource type
- Benefits:
• Pretty URL: site.com/case-study/name-of-case-study/
• Archive page generation
• More obvious editing access for end user
• Can target edit screen by post type for including
additional meta boxes and taxonomies
Custom Taxonomies
• Category-like capabilities
- Can also function like tags if no hierarchy needed or
multiples chosen per post
• Archive page generation
• Easy method to focus queries around
• Can be added to any post type - and even to
users!
Taxonomy vs. Meta Box
• Taxonomies are for grouping things
categorically.
• Meta boxes are for data that is customized
per post.
Content Structure:
Page Templates
• page-resources.php
- Pro: Easily identified in our theme structure
- Con: Loses association if a content editor
changes the slug
• template-resources.php
- Pro: Keeps association regardless of slug
- Con: Could be applied to other pages by
content editors less familiar with the site's
architecture
CPTs And Custom
Taxonomies In
Action!
Basic WP_Query $args For Each
Resource Page Section Loop
$args = array(
'post_type' => 'case_study',
'posts_per_page' => 10
)
);
Adding the Issues Taxonomy
To Newsletters
$args = array(
'post_type' => 'newsletter',
'posts_per_page' => 10,
'tax_query' => array(
array(
'taxonomy' => 'issues',
'field' => 'slug',
'terms' => 'spring-2014'
)
)
);
Content Structure:
SingleView
<?php while ( have_posts() ) : the_post(); ?>
/* Line of awesome */
<?php get_template_part( 'content', get_post_type() ); ?>
/* pagination & comments */
<?php endwhile; // end of the loop. ?>
get_template_part()
For A Case Study
get_template_part( 'content', get_post_type() );
==
get_template_part( 'content', 'case_study' );
==
include 'content-case_study.php';
Conditional Inclusion
<?php while ( have_posts() ) : the_post(); ?>
<?php
if( 'case_study' == get_post_type() || 'white_paper' == get_post_type() ) {
get_template_part( 'content', 'document' );
} else {
// i.e. 'post' or 'newsletter'
get_template_part( 'content', get_post_type() );
}
?>
/* pagination & comments */
<?php endwhile; // end of the loop. ?>
Conditional Sidebar
$resource_cpts = array('case_study', 'white_paper', 'newsletter');
if( in_array( get_post_type(), $resource_cpts) ) {
get_sidebar('resources');
} else {
// For single blog posts
get_sidebar();
}
Resources Content Structure Recap
• Create a CPT for each resource type
• Create a custom taxonomy for newsletter issues
• template-resources.php
- Three tidy queries to show each of our resource types
Resources Content Structure Recap
• single.php
- Keep a tidy loop with a simple conditional and
get_template_part()
• Create two content templates
- content-document.php for both case studies and
white papers
- content-newsletters.php for... newsletters
Applied Benefits Of
Content-First Development
• Conclude that three CPTs are needed
• Find that users would benefit from a meta box and
custom taxonomy
• Know to create one unique template:
- template-resources.php
Applied Benefits Of
Content-First Development
• Know to prepare UI elements for two content
parts:
1.content-document.php
2.content-newsletters.php
• Can note template files as wireframe notes for
designers
• Know that your end user will be able to find, edit,
and create new content easily!
In Conclusion...
A content-first development
approach to WordPress makes for:
A content-first development
approach to WordPress makes for:
• cleaner themes
A content-first development
approach to WordPress makes for:
• cleaner themes
• less back-tracking and exclamations of
"oh yeah, we need to do this!"
A content-first development
approach to WordPress makes for:
• cleaner themes
• less back-tracking and exclamations of
"oh yeah, we need to do this!"
• happier end users
A content-first development
approach to WordPress makes for:
• cleaner themes
• less back-tracking and exclamations of
"oh yeah, we need to do this!"
• happier end users
•happier you
Q&A Time!
Stephanie Eckles @5t3ph thinkdobecreate.com
Q&A Time!
Stephanie Eckles @5t3ph thinkdobecreate.com

Contenu connexe

Tendances

A11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeA11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeTomAuger
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingJamie Schmid
 
Technical SEO Introduction
Technical SEO IntroductionTechnical SEO Introduction
Technical SEO IntroductionEitan Helman
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Eric Overfield
 
SharePoint 2013 Search Driven Sites - SPSHOU
SharePoint 2013 Search Driven Sites - SPSHOUSharePoint 2013 Search Driven Sites - SPSHOU
SharePoint 2013 Search Driven Sites - SPSHOUBrian Culver
 
Wordpress template hierarchy
Wordpress template hierarchyWordpress template hierarchy
Wordpress template hierarchyStockton Group
 
Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...
Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...
Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...SEO Ghaziabad
 
SEO for Developers
SEO for DevelopersSEO for Developers
SEO for DevelopersExove
 
Search Engine Optimization courses in ghaziabad, Search engine Optimization t...
Search Engine Optimization courses in ghaziabad, Search engine Optimization t...Search Engine Optimization courses in ghaziabad, Search engine Optimization t...
Search Engine Optimization courses in ghaziabad, Search engine Optimization t...SEO Master LLC
 
On page SEO
On page SEOOn page SEO
On page SEOBIMPA
 
Webiny CMS Starter Guide
Webiny CMS Starter GuideWebiny CMS Starter Guide
Webiny CMS Starter GuideWebiny
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond bloggingJulien Minguely
 
Content query web part – get it all in one place and style it!
Content query web part – get it all in one place and style it!Content query web part – get it all in one place and style it!
Content query web part – get it all in one place and style it!Benjamin Niaulin
 
SharePoint 2013 Content search web part - Get it all in one place and style it!
SharePoint 2013 Content search web part - Get it all in one place and style it!SharePoint 2013 Content search web part - Get it all in one place and style it!
SharePoint 2013 Content search web part - Get it all in one place and style it!Benjamin Niaulin
 
HTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTMLHTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTMLGrayzon Gonzales, LPT
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developersHernan Mammana
 
SharePoint Saturday Utah 2015 - SP2013 Search Driven Sites
SharePoint Saturday Utah 2015 - SP2013 Search Driven SitesSharePoint Saturday Utah 2015 - SP2013 Search Driven Sites
SharePoint Saturday Utah 2015 - SP2013 Search Driven SitesBrian Culver
 

Tendances (20)

A11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeA11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress Theme
 
EVOLVE'13 | Enhance | Effective SEO | Paul Legan
EVOLVE'13 | Enhance | Effective SEO | Paul LeganEVOLVE'13 | Enhance | Effective SEO | Paul Legan
EVOLVE'13 | Enhance | Effective SEO | Paul Legan
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
 
Technical SEO Introduction
Technical SEO IntroductionTechnical SEO Introduction
Technical SEO Introduction
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365
 
Open Source CMS
Open Source CMSOpen Source CMS
Open Source CMS
 
SharePoint 2013 Search Driven Sites - SPSHOU
SharePoint 2013 Search Driven Sites - SPSHOUSharePoint 2013 Search Driven Sites - SPSHOU
SharePoint 2013 Search Driven Sites - SPSHOU
 
Wordpress template hierarchy
Wordpress template hierarchyWordpress template hierarchy
Wordpress template hierarchy
 
کارگاه سئو
کارگاه سئوکارگاه سئو
کارگاه سئو
 
Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...
Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...
Search engine optimization,Best SEO institute in Ghaziabad,SEO Courses in Gha...
 
SEO for Developers
SEO for DevelopersSEO for Developers
SEO for Developers
 
Search Engine Optimization courses in ghaziabad, Search engine Optimization t...
Search Engine Optimization courses in ghaziabad, Search engine Optimization t...Search Engine Optimization courses in ghaziabad, Search engine Optimization t...
Search Engine Optimization courses in ghaziabad, Search engine Optimization t...
 
On page SEO
On page SEOOn page SEO
On page SEO
 
Webiny CMS Starter Guide
Webiny CMS Starter GuideWebiny CMS Starter Guide
Webiny CMS Starter Guide
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 
Content query web part – get it all in one place and style it!
Content query web part – get it all in one place and style it!Content query web part – get it all in one place and style it!
Content query web part – get it all in one place and style it!
 
SharePoint 2013 Content search web part - Get it all in one place and style it!
SharePoint 2013 Content search web part - Get it all in one place and style it!SharePoint 2013 Content search web part - Get it all in one place and style it!
SharePoint 2013 Content search web part - Get it all in one place and style it!
 
HTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTMLHTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTML
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
SharePoint Saturday Utah 2015 - SP2013 Search Driven Sites
SharePoint Saturday Utah 2015 - SP2013 Search Driven SitesSharePoint Saturday Utah 2015 - SP2013 Search Driven Sites
SharePoint Saturday Utah 2015 - SP2013 Search Driven Sites
 

En vedette

Zero Hour Directions vocab unit 1
Zero Hour Directions vocab unit 1Zero Hour Directions vocab unit 1
Zero Hour Directions vocab unit 1mrodgersjps
 
Lathalain 140810210720-phpapp01
Lathalain 140810210720-phpapp01Lathalain 140810210720-phpapp01
Lathalain 140810210720-phpapp01Elvira Regidor
 
Anchoring and Adjustment in Behavioral Economics
Anchoring and Adjustment in Behavioral EconomicsAnchoring and Adjustment in Behavioral Economics
Anchoring and Adjustment in Behavioral EconomicsRussell James
 
Counting Revocable Planned Gifts in Fundraising - Return from Fantasy Island
Counting Revocable Planned Gifts in Fundraising - Return from Fantasy IslandCounting Revocable Planned Gifts in Fundraising - Return from Fantasy Island
Counting Revocable Planned Gifts in Fundraising - Return from Fantasy IslandRussell James
 
Peer pressure presentation
Peer pressure presentationPeer pressure presentation
Peer pressure presentationmrodgersjps
 
Student Project: Go Green
Student Project: Go GreenStudent Project: Go Green
Student Project: Go Greenicti
 
Student Project: Peer Pressure
Student Project: Peer PressureStudent Project: Peer Pressure
Student Project: Peer Pressureicti
 
Pagtuturo ng filipino (1)
Pagtuturo ng filipino (1)Pagtuturo ng filipino (1)
Pagtuturo ng filipino (1)Elvira Regidor
 

En vedette (12)

Zero Hour Directions vocab unit 1
Zero Hour Directions vocab unit 1Zero Hour Directions vocab unit 1
Zero Hour Directions vocab unit 1
 
L'effet d'attendre
L'effet d'attendreL'effet d'attendre
L'effet d'attendre
 
Lathalain 140810210720-phpapp01
Lathalain 140810210720-phpapp01Lathalain 140810210720-phpapp01
Lathalain 140810210720-phpapp01
 
Peer Effects
Peer EffectsPeer Effects
Peer Effects
 
Anchoring and Adjustment in Behavioral Economics
Anchoring and Adjustment in Behavioral EconomicsAnchoring and Adjustment in Behavioral Economics
Anchoring and Adjustment in Behavioral Economics
 
Counting Revocable Planned Gifts in Fundraising - Return from Fantasy Island
Counting Revocable Planned Gifts in Fundraising - Return from Fantasy IslandCounting Revocable Planned Gifts in Fundraising - Return from Fantasy Island
Counting Revocable Planned Gifts in Fundraising - Return from Fantasy Island
 
Sociology Peer Pressure
Sociology Peer PressureSociology Peer Pressure
Sociology Peer Pressure
 
Peer Groups
Peer GroupsPeer Groups
Peer Groups
 
Peer pressure presentation
Peer pressure presentationPeer pressure presentation
Peer pressure presentation
 
Student Project: Go Green
Student Project: Go GreenStudent Project: Go Green
Student Project: Go Green
 
Student Project: Peer Pressure
Student Project: Peer PressureStudent Project: Peer Pressure
Student Project: Peer Pressure
 
Pagtuturo ng filipino (1)
Pagtuturo ng filipino (1)Pagtuturo ng filipino (1)
Pagtuturo ng filipino (1)
 

Similaire à Content-Driven WordPress Development - WordCamp Omaha 2014

The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012Stephanie Leary
 
The Flexibility of WordPress
The Flexibility of WordPressThe Flexibility of WordPress
The Flexibility of WordPressStephanie Eckles
 
Building a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngineBuilding a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngineOttergoose
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchyJason Yingling
 
The WordPress University
The WordPress UniversityThe WordPress University
The WordPress UniversityStephanie Leary
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme ReviewCatch Themes
 
Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25New Tricks
 
Basic word press development
Basic word press developmentBasic word press development
Basic word press developmentDavid Wolfpaw
 
WordPress - Open Source Overview Presentation
WordPress - Open Source Overview PresentationWordPress - Open Source Overview Presentation
WordPress - Open Source Overview PresentationAndy Stratton
 
Word press interview question and answer tops technologies
Word press interview question and answer   tops technologiesWord press interview question and answer   tops technologies
Word press interview question and answer tops technologiesTOPS Technologies
 
WordPress can do that?!
WordPress can do that?!WordPress can do that?!
WordPress can do that?!Scott McNulty
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Jacob Martella
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme developmentNaeem Junejo
 
WordPress Webinar Training Presentation
WordPress Webinar Training PresentationWordPress Webinar Training Presentation
WordPress Webinar Training PresentationMayeCreate Design
 
Best Practices for Building Sites in dotCMS
Best Practices for Building Sites in dotCMSBest Practices for Building Sites in dotCMS
Best Practices for Building Sites in dotCMSMichael Fienen
 
advance theme development
advance theme developmentadvance theme development
advance theme development1amitgupta
 

Similaire à Content-Driven WordPress Development - WordCamp Omaha 2014 (20)

The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012
 
The Flexibility of WordPress
The Flexibility of WordPressThe Flexibility of WordPress
The Flexibility of WordPress
 
Building a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngineBuilding a Simple, Responsive Website with ExpressionEngine
Building a Simple, Responsive Website with ExpressionEngine
 
Wordpress overview
Wordpress overviewWordpress overview
Wordpress overview
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchy
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
The WordPress University
The WordPress UniversityThe WordPress University
The WordPress University
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme Review
 
Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25
 
Basic word press development
Basic word press developmentBasic word press development
Basic word press development
 
WordPress - Open Source Overview Presentation
WordPress - Open Source Overview PresentationWordPress - Open Source Overview Presentation
WordPress - Open Source Overview Presentation
 
Word press interview question and answer tops technologies
Word press interview question and answer   tops technologiesWord press interview question and answer   tops technologies
Word press interview question and answer tops technologies
 
WordPress can do that?!
WordPress can do that?!WordPress can do that?!
WordPress can do that?!
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
 
WordPress Webinar Training Presentation
WordPress Webinar Training PresentationWordPress Webinar Training Presentation
WordPress Webinar Training Presentation
 
Working with the Latest Tendenci Modules
Working with the Latest Tendenci ModulesWorking with the Latest Tendenci Modules
Working with the Latest Tendenci Modules
 
Best Practices for Building Sites in dotCMS
Best Practices for Building Sites in dotCMSBest Practices for Building Sites in dotCMS
Best Practices for Building Sites in dotCMS
 
advance theme development
advance theme developmentadvance theme development
advance theme development
 

Dernier

9990611130 Find & Book Russian Call Girls In Crossings Republik
9990611130 Find & Book Russian Call Girls In Crossings Republik9990611130 Find & Book Russian Call Girls In Crossings Republik
9990611130 Find & Book Russian Call Girls In Crossings RepublikGenuineGirls
 
Your LinkedIn Makeover: Sociocosmos Presence Package
Your LinkedIn Makeover: Sociocosmos Presence PackageYour LinkedIn Makeover: Sociocosmos Presence Package
Your LinkedIn Makeover: Sociocosmos Presence PackageSocioCosmos
 
Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...
Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...
Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...baharayali
 
Interpreting the brief for the media IDY
Interpreting the brief for the media IDYInterpreting the brief for the media IDY
Interpreting the brief for the media IDYgalaxypingy
 
Ready to get noticed? Partner with Sociocosmos
Ready to get noticed? Partner with SociocosmosReady to get noticed? Partner with Sociocosmos
Ready to get noticed? Partner with SociocosmosSocioCosmos
 
Night 7k Call Girls Noida Sector 120 Call Me: 8448380779
Night 7k Call Girls Noida Sector 120 Call Me: 8448380779Night 7k Call Girls Noida Sector 120 Call Me: 8448380779
Night 7k Call Girls Noida Sector 120 Call Me: 8448380779Delhi Call girls
 
Learn About the Rise of Instagram Pro in 2024
Learn About the Rise of Instagram Pro in 2024Learn About the Rise of Instagram Pro in 2024
Learn About the Rise of Instagram Pro in 2024Islam Fit
 
CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...
CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...
CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...anilsa9823
 
Call Girls In Patel Nagar Delhi 9654467111 Escorts Service
Call Girls In Patel Nagar Delhi 9654467111 Escorts ServiceCall Girls In Patel Nagar Delhi 9654467111 Escorts Service
Call Girls In Patel Nagar Delhi 9654467111 Escorts ServiceSapana Sha
 
SELECTING A SOCIAL MEDIA MARKETING COMPANY
SELECTING A SOCIAL MEDIA MARKETING COMPANYSELECTING A SOCIAL MEDIA MARKETING COMPANY
SELECTING A SOCIAL MEDIA MARKETING COMPANYdizinfo
 
Call Girls In Gurgaon Dlf pHACE 2 Women Delhi ncr
Call Girls In Gurgaon Dlf pHACE 2 Women Delhi ncrCall Girls In Gurgaon Dlf pHACE 2 Women Delhi ncr
Call Girls In Gurgaon Dlf pHACE 2 Women Delhi ncrSapana Sha
 
c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...
c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...
c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...gurkirankumar98700
 
Improve Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing CompanyImprove Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing CompanyWSI INTERNET PARTNER
 
Codes and Conventions of Artists' Websites
Codes and Conventions of Artists' WebsitesCodes and Conventions of Artists' Websites
Codes and Conventions of Artists' WebsitesLukeNash7
 
Call^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call Me
Call^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call MeCall^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call Me
Call^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call MeMs Riya
 
Social media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketingSocial media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketingSheikhSaifAli1
 
Night 7k Call Girls Atta Market Escorts Call Me: 8448380779
Night 7k Call Girls Atta Market Escorts Call Me: 8448380779Night 7k Call Girls Atta Market Escorts Call Me: 8448380779
Night 7k Call Girls Atta Market Escorts Call Me: 8448380779Delhi Call girls
 
Call Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking MenCall Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking MenSapana Sha
 

Dernier (20)

Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Masudpur
Delhi  99530 vip 56974  Genuine Escort Service Call Girls in MasudpurDelhi  99530 vip 56974  Genuine Escort Service Call Girls in Masudpur
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Masudpur
 
9990611130 Find & Book Russian Call Girls In Crossings Republik
9990611130 Find & Book Russian Call Girls In Crossings Republik9990611130 Find & Book Russian Call Girls In Crossings Republik
9990611130 Find & Book Russian Call Girls In Crossings Republik
 
Your LinkedIn Makeover: Sociocosmos Presence Package
Your LinkedIn Makeover: Sociocosmos Presence PackageYour LinkedIn Makeover: Sociocosmos Presence Package
Your LinkedIn Makeover: Sociocosmos Presence Package
 
Bicycle Safety in Focus: Preventing Fatalities and Seeking Justice
Bicycle Safety in Focus: Preventing Fatalities and Seeking JusticeBicycle Safety in Focus: Preventing Fatalities and Seeking Justice
Bicycle Safety in Focus: Preventing Fatalities and Seeking Justice
 
Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...
Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...
Top Astrologer, Kala ilam specialist in USA and Bangali Amil baba in Saudi Ar...
 
Interpreting the brief for the media IDY
Interpreting the brief for the media IDYInterpreting the brief for the media IDY
Interpreting the brief for the media IDY
 
Ready to get noticed? Partner with Sociocosmos
Ready to get noticed? Partner with SociocosmosReady to get noticed? Partner with Sociocosmos
Ready to get noticed? Partner with Sociocosmos
 
Night 7k Call Girls Noida Sector 120 Call Me: 8448380779
Night 7k Call Girls Noida Sector 120 Call Me: 8448380779Night 7k Call Girls Noida Sector 120 Call Me: 8448380779
Night 7k Call Girls Noida Sector 120 Call Me: 8448380779
 
Learn About the Rise of Instagram Pro in 2024
Learn About the Rise of Instagram Pro in 2024Learn About the Rise of Instagram Pro in 2024
Learn About the Rise of Instagram Pro in 2024
 
CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...
CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...
CALL ON ➥8923113531 🔝Call Girls Ashiyana Colony Lucknow best sexual service O...
 
Call Girls In Patel Nagar Delhi 9654467111 Escorts Service
Call Girls In Patel Nagar Delhi 9654467111 Escorts ServiceCall Girls In Patel Nagar Delhi 9654467111 Escorts Service
Call Girls In Patel Nagar Delhi 9654467111 Escorts Service
 
SELECTING A SOCIAL MEDIA MARKETING COMPANY
SELECTING A SOCIAL MEDIA MARKETING COMPANYSELECTING A SOCIAL MEDIA MARKETING COMPANY
SELECTING A SOCIAL MEDIA MARKETING COMPANY
 
Call Girls In Gurgaon Dlf pHACE 2 Women Delhi ncr
Call Girls In Gurgaon Dlf pHACE 2 Women Delhi ncrCall Girls In Gurgaon Dlf pHACE 2 Women Delhi ncr
Call Girls In Gurgaon Dlf pHACE 2 Women Delhi ncr
 
c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...
c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...
c Starting with 5000/- for Savita Escorts Service 👩🏽‍❤️‍💋‍👨🏿 8923113531 ♢ Boo...
 
Improve Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing CompanyImprove Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing Company
 
Codes and Conventions of Artists' Websites
Codes and Conventions of Artists' WebsitesCodes and Conventions of Artists' Websites
Codes and Conventions of Artists' Websites
 
Call^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call Me
Call^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call MeCall^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call Me
Call^ Girls Delhi Independent girls Chanakyapuri 9711199012 Call Me
 
Social media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketingSocial media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketing
 
Night 7k Call Girls Atta Market Escorts Call Me: 8448380779
Night 7k Call Girls Atta Market Escorts Call Me: 8448380779Night 7k Call Girls Atta Market Escorts Call Me: 8448380779
Night 7k Call Girls Atta Market Escorts Call Me: 8448380779
 
Call Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking MenCall Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking Men
 

Content-Driven WordPress Development - WordCamp Omaha 2014

  • 2. WordPress Is: • An extremely flexible CMS • An easily modifiable database • A strong foundation to jump-start projects • A growing app platform • ...Sometimes a blog
  • 4. Presentation Goals • See how a content-first development approach looks • Review how WordPress displays and relates content • Design a structure that supports content- first development
  • 6. Benefits of Content-First Development • More productive discussions with content writers • Better understanding of the site architecture by designers • Speedier sites • More efficient queries • Less confusion for the end user
  • 7.
  • 8. What is the relationship of this content to the rest of the project?
  • 9. A Simple Example: Blog Considerations • Categories • Tags • Handle multiple authors • Have related sidebar content
  • 10. For successful content-first development, all possibilities for content relationships are identified up-front.
  • 11. What events would cause this piece of content to be modified?
  • 12. Dynamic Sidebar • Dynamic sidebar content will be related posts widget • Related posts are based on matching the category • They are ordered with the newest first, displaying up to 5 • They should exclude the current post
  • 13. Content-driven development means being very purposeful in choosing the mechanisms for data entry.
  • 14. Typical Marketing Website Needs • Unique front page • Non-central blog page • Multi-level navigation • Multiple menus (header, footer, sitemap) • Resources section with press releases, case studies, and white papers • Lead generation forms • Landing pages for services • Search
  • 16. Index vs. Home vs. Front-Page
  • 17. Remnants from HTML Development • index.html - default page rendered - www.site.com/ > loads > www.site.com/index.html • "Index" equates both "Home" and "Front Page" for the root site
  • 18. WordPress: Index, Home, and Front Page = 3 Different Use Cases
  • 19. index.php • The lowest-tier default template used if no unique templates exist above it in the template hierarchy (we'll circle back to that) • Can be both the home and front page IF there is no intention to make the front page unique - Or if you want to deal with a crazy mess of conditionals
  • 20. home.php • Relic of WordPress being a largely blog platform • Template for posts if either: 1. Front page settings of site is set to show latest posts 2. Blog is non-central to the site's focus (i.e. not the "home" page) • Then set a different published Page as the "Posts" page under Settings > Reading
  • 21. front-page.php • If this exists in a theme, will be first priority to be used to display the site's front page, regardless if latests posts or a static page is chosen • "Front page" static page can be defined under Settings > Reading
  • 22.
  • 23. Front Page Dictated By Site's Purpose
  • 24. WordPress As A Blog • Create a unique home.php • Leave default Reading settings to display latest posts
  • 25. WordPress For A Business • Create unique front-page.php • Publish a "Home" page • Define the "Home" page as the front page under Reading settings
  • 26. WordPress For A Business With a Blog • Create unique front-page.php and unique home.php • Publish a "Home" page • Publish a "Blog" page • Define the "Home" page as the front page under Reading settings • Define the "Blog" page as the posts page under Reading settings
  • 27. #DoingItWrong • Not define the front and posts pages • Create your "home" page template on index.php • Create a custom page template and write an unnecessary query to create a paginated blog template
  • 28. Any Questions on Index vs. Home vs. Front Page?
  • 30. Posts • Date-based • Use categories • Displayed in RSS feed • Generally for blog or news articles Template hierarchy in priority order: - single-posttype.php (we'll get to that) - single.php - index.php
  • 31. Pages • Generally static • No categories or tags • Hierarchal (can define parent and child relationships) • Usually top-level content for non- blog focused sites Template hierarchy in priority order: - Custom template chosen from Page Attributes - page-pageslug.php - page-id.php - page.php - index.php
  • 33. Benefits of Custom Meta Data • Can be any key/value pair • Can be displayed automatically in a way dictated by the theme • Can be used to affect the main query
  • 34. Greatest Benefit of Custom Meta Data • Can be entered via a custom-created meta box on the edit screen of any post type • Allows for precise data entry due to constraints of the form field chosen • Finer control over display or use information within the theme - Example:A meta box for a call-to-action button would have a text field for the url and a text field for the button text
  • 35.
  • 37. Custom Post Type Benefits • Customize URL structure - site.com/**posttype**/post-slug/ • Can be excluded from search and nav menu selection - Useful for: using entries as slide content in a carousel • Can prevent inclusion in front-end queries - Useful for: a documentation index displayed only in admin
  • 38. Custom Post Type Benefits • Limit UI elements on edit page - Useful for: only showing the title, excerpt, and featured image to create an image carousel with non-html captions • Can define menu placement and structure for admin - Useful for: grouping related CPTs, such as for a Resources section • More clearly defined area to edit particular content - Meaning less calls and emails of "how do I change this?
  • 40. Marketing Site Example • Resources Section - Press releases - Case studies - White papers
  • 41. Content-First Considerations: • What information is related to each unique content entry • What is displayed for each entry on the main resources page • What is displayed on the single view for each entry • Special circumstances for viewing content • How to make the content easily maintainable by the end user
  • 42. Content Considerations For Each Type • Title • Full Content / Description • Document download • Special Content Case - Newsletter Issue Archives
  • 43. Resource PageView Considerations • Title • Excerpt • "Read More" link
  • 44. Single ResourceView Considerations • Title • Full Content • Access to document download - Button for direct download • List of other recent resources of same type
  • 45. Preparing for Content • Determine content entry UI elements - Title - Editor - Excerpt - Meta Box • Upload field for a document download - Unique Feature • A way to link "Issues" for the newsletter CPT
  • 46. Preparing for Content • Setup a CPT for each resource type - Benefits: • Pretty URL: site.com/case-study/name-of-case-study/ • Archive page generation • More obvious editing access for end user • Can target edit screen by post type for including additional meta boxes and taxonomies
  • 47. Custom Taxonomies • Category-like capabilities - Can also function like tags if no hierarchy needed or multiples chosen per post • Archive page generation • Easy method to focus queries around • Can be added to any post type - and even to users!
  • 48. Taxonomy vs. Meta Box • Taxonomies are for grouping things categorically. • Meta boxes are for data that is customized per post.
  • 49.
  • 50. Content Structure: Page Templates • page-resources.php - Pro: Easily identified in our theme structure - Con: Loses association if a content editor changes the slug • template-resources.php - Pro: Keeps association regardless of slug - Con: Could be applied to other pages by content editors less familiar with the site's architecture
  • 52. Basic WP_Query $args For Each Resource Page Section Loop $args = array( 'post_type' => 'case_study', 'posts_per_page' => 10 ) );
  • 53. Adding the Issues Taxonomy To Newsletters $args = array( 'post_type' => 'newsletter', 'posts_per_page' => 10, 'tax_query' => array( array( 'taxonomy' => 'issues', 'field' => 'slug', 'terms' => 'spring-2014' ) ) );
  • 54.
  • 55. Content Structure: SingleView <?php while ( have_posts() ) : the_post(); ?> /* Line of awesome */ <?php get_template_part( 'content', get_post_type() ); ?> /* pagination & comments */ <?php endwhile; // end of the loop. ?>
  • 56. get_template_part() For A Case Study get_template_part( 'content', get_post_type() ); == get_template_part( 'content', 'case_study' ); == include 'content-case_study.php';
  • 57. Conditional Inclusion <?php while ( have_posts() ) : the_post(); ?> <?php if( 'case_study' == get_post_type() || 'white_paper' == get_post_type() ) { get_template_part( 'content', 'document' ); } else { // i.e. 'post' or 'newsletter' get_template_part( 'content', get_post_type() ); } ?> /* pagination & comments */ <?php endwhile; // end of the loop. ?>
  • 58. Conditional Sidebar $resource_cpts = array('case_study', 'white_paper', 'newsletter'); if( in_array( get_post_type(), $resource_cpts) ) { get_sidebar('resources'); } else { // For single blog posts get_sidebar(); }
  • 59. Resources Content Structure Recap • Create a CPT for each resource type • Create a custom taxonomy for newsletter issues • template-resources.php - Three tidy queries to show each of our resource types
  • 60. Resources Content Structure Recap • single.php - Keep a tidy loop with a simple conditional and get_template_part() • Create two content templates - content-document.php for both case studies and white papers - content-newsletters.php for... newsletters
  • 61. Applied Benefits Of Content-First Development • Conclude that three CPTs are needed • Find that users would benefit from a meta box and custom taxonomy • Know to create one unique template: - template-resources.php
  • 62. Applied Benefits Of Content-First Development • Know to prepare UI elements for two content parts: 1.content-document.php 2.content-newsletters.php • Can note template files as wireframe notes for designers • Know that your end user will be able to find, edit, and create new content easily!
  • 64. A content-first development approach to WordPress makes for:
  • 65. A content-first development approach to WordPress makes for: • cleaner themes
  • 66. A content-first development approach to WordPress makes for: • cleaner themes • less back-tracking and exclamations of "oh yeah, we need to do this!"
  • 67. A content-first development approach to WordPress makes for: • cleaner themes • less back-tracking and exclamations of "oh yeah, we need to do this!" • happier end users
  • 68. A content-first development approach to WordPress makes for: • cleaner themes • less back-tracking and exclamations of "oh yeah, we need to do this!" • happier end users •happier you
  • 69. Q&A Time! Stephanie Eckles @5t3ph thinkdobecreate.com
  • 70. Q&A Time! Stephanie Eckles @5t3ph thinkdobecreate.com

Notes de l'éditeur

  1. First, let&amp;apos;s look at why many of us build on WordPress.
  2. How many of you have heard some version of this question?It&amp;apos;s this question that led me to this topic, to help spread the word that WordPress is so much more than a blogging platform.
  3. First, let&amp;apos;s look at why many of us build on WordPress.
  4. I would go so far as to say… You may think you know WordPress, but I would bet some of you are actually stuck in a rut of doing things a certain way because it seems to work. That&amp;apos;s fine, but are you sure your way makes sense to the final content creator? Examining your process from a content-first perspective leads to cleaner themes and happier users.
  5. A thorough understanding of how WordPress retrieves and relates content leads to:
  6. But wait… how do you get started developing in a content-driven way?This may depend on if you&amp;apos;re a single-person shop or within an agency of some sort. Personally, I&amp;apos;m in the marketing department of a large corporation, but I also develop custom WordPress builds for freelance clients. No matter your situation, a content-first approach begins with asking:
  7. In this example, the first three are native behaviors, but the dynamically-related sidebar content needs more consideration.
  8. --- Learning to consider content relationships may lead you to think of even a &amp;quot;simple&amp;quot; marketing site in a more app-like way.Another way to consider relationships is by asking:
  9. Let&amp;apos;s look at developing the dynamic sidebar for our blog post example. So - this means that choosing the category for a post should be very purposeful, possibly even limited to a few strategic options.Or - maybe categories are actually types of portfolio work, so the related widget will pull in other logo posts.Or - maybe categories are used to identify courses for a recipe focused website, so the widget will show related main dishes.
  10. Categories can be used in those previous examples IF the site is very focused on those types of subjects. But let&amp;apos;s look at a larger example.
  11. ... and each of those comes with it&amp;apos;s own set of questions to narrow down the type of content to be entered for each. To figure out how to handle each of these, we need to find out...
  12. To determine our content creation structure, it&amp;apos;s helpful to learn how WordPress displays and relates different content.
  13. --- Here&amp;apos;s where content-first approach takes hold. Even seasoned developers have trouble with or completely miss the concept of how to define home page content. It took me a few years to stumble upon the correct information. The confusion stems from...
  14. I think this refresher may help more than the n00bs in the crowd. Public confession: I&amp;apos;ve only done this setup correctly for sites I&amp;apos;ve built in the past 6 months.
  15. Now that we&amp;apos;ve looked at how WordPress uses index, home, and front page templates, you can see why we&amp;apos;ve started there with our content-first development. --click-- It&amp;apos;s important to consider the site&amp;apos;s purpose before you even go so far as to create the structure for the front page. Here&amp;apos;s a few common scenarios that dictate the front page:
  16. ...I mention this because it&amp;apos;s how I did it until I took the time to finally get these three templates straightened out in my head! If you&amp;apos;ve been doing it this way too, perhaps you might benefit from knowing that defining the posts page means the query is all ready for you, including the paged variable. Just write a normal loop and include posts navigation and everything will work smoothly!
  17. Let&amp;apos;s continue on and look at… Ok, this one is pretty basic. In fact, it&amp;apos;s probably the first thing you learned when you signed up for a WordPress.com account and upgraded from your Blogger account. But let&amp;apos;s review:
  18. An additional layer of data you can include by default on either posts or pages is custom meta. In terms of content-driven development, this allows you to expand on the content entry ability default posts and pages in a comfortable but very useful way.
  19. If the site you&amp;apos;re building needs a blog, an About page, and a Contact page, sticking with just Posts and Pages is all you need to worry about.But if you&amp;apos;ve spent time developing custom solutions, you know that Posts and Pages can be pretty limiting. For any advanced functionality, you may be creating numerous custom page templates, and likely struggling with relating content beyond a parent/child relationship for pages and categories or tags for posts.Custom meta data can get you part of the way if you choose to use that to alter a query. However, custom meta can also lure you to the dark side of customization: offering too many options that aren&amp;apos;t needed for every single entry. --CLICK--Custom Post Types, or CPTs, allow you to define a wholly unique type of content. Today we&amp;apos;ll look at CPTs more theoretically rather than discuss every option available in creating them. Custom Post Types, or CPTs, allow you to define a wholly unique type of content. Today we&amp;apos;ll look at CPTs more theoretically rather than discuss every option available in creating them.
  20. I am of the school of thought that any functionality that creates new content belongs in a plugin so that site owners don&amp;apos;t lose access should they switch themes. You could argue that CPTs belong in themes because you may need to create templates to accommodate them. We&amp;apos;re not going to spend time going over all the pros and cons today, but it&amp;apos;s something to consider as you create a site that best fits your client&amp;apos;s needs.
  21. Back to our earlier example, one of the requirements for our marketing site was a resources section with the following types of content:
  22. Now that we know what content elements we&amp;apos;d like for each view, it&amp;apos;s time to consider what UI elements we&amp;apos;ll need for the user to enter that content. Based on what we&amp;apos;ve mapped out, and what we now know about various content types in WordPress, we&amp;apos;ll need...
  23. We also know we&amp;apos;ll want to...
  24. Our newsletter resource type is in need of a way to link posts belonging to the same issue, such as &amp;quot;Spring 2014&amp;quot;. Custom taxonomies are how we can achieve this because of:
  25. Now that we know what both of these are, a quick rule of thumb for choosing one over the other:
  26. Ok, we&amp;apos;ve settled how we&amp;apos;re entering content, so now let&amp;apos;s look at creating the view for the theme. --CLICK-- When we reviewed pages, we saw that there were multiple options in the template hierarchy for pages, and we need to choose one to customize our resources page. ---- For our purposes, we&amp;apos;ll chose to create a custom template template-resources.php because the risk of the slug changing is greater than if the template was applied to multiple pages. If you have fewer content editors, and perhaps have already had an SEO review validating your slug choice, you may decide to go with the slug option.
  27. Thanks to our careful content-driven structure, we can create the three loops we need on this page with ease!Our wireframe included showing up to 10 case studies and white papers in their own section, plus a newsletter section with all entries from the latest issue.
  28. One semi-tricky thing about Custom Post Types is they will use single.php as a default template. For our single resource views, we want a little extra markup to display the download document button, plus include a special sidebar. --CLICK--I&amp;apos;d like to introduce a pattern used by the excellent starter theme _s. It keeps things simple by only having single.php but modifying the default loop as follows:
  29. See the power in that? Now we can simply customize the guts of each post based on it&amp;apos;s type.
  30. For our purposes, the case study and white paper pages content will be the same, so we&amp;apos;ll take this our single.php loop one step further:--- Then, we can include the document download button just on content-document.php, and include the name of the issue on content-newsletter.php.
  31. We can employ a similar conditional to alter which sidebar gets included back on the single.php template:
  32. --CLICK-- for each