Carrington Core
For Maintainable WordPress Websites

Alex King
Goals
• Create maintainable websites	

• Make functionality and features more
obvious	


• Make WP theme development more
...
Principles
• Convention over code (it’s a framework)	

• More templates > More conditional code	

• 100% addative	

• Deve...
Lots of Directories!
• DON’T PANIC	

• This is the same WordPress structure you
know and love
Structure
Posts

Single

Header

Loop

Content/
Excerpt

Sidebar
Comments

Page

Footer
Context Types
• COMMENT 	

= comment & user info

(dir: comment)
• POST = individual post/page info

(dirs: content, excer...
General Templates
Header, Sidebar, Footer

•
•
•
•
•
•
•
•
•

{dir}-default.php	

home.php	

search.php	

single.php	

pag...
Post Templates
Content, Excerpt

•
•
•
•
•
•

{dir}-default.php	

author-{username}.php	

meta-{key}-{value}.php	

meta-{k...
Single & Feed (Post Context)
You can use the Post context template
selection:

• on single pages by	

 prefixing with {sing...
Comment Templates
•
•
•
•

comment-default.php	

author.php	

user-{username}.php	

role-{role}.php

• ping.php	

• meta-{...
Child Themes
• Available templates are merged	

• Templates in child theme stomp those in
parent theme
Example
Resources
•

GitHub Repos

github.com/crowdfavorite/wp-carrington-core

github.com/crowdfavorite/wp-carrington-core-docs

...
Upcoming SlideShare
Loading in …5
×

Carrington Core (2014)

5,819 views

Published on

Create maintainable WordPress websites.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,819
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Carrington Core (2014)

  1. 1. Carrington Core For Maintainable WordPress Websites Alex King
  2. 2. Goals • Create maintainable websites • Make functionality and features more obvious • Make WP theme development more accessible to front-end devs
  3. 3. Principles • Convention over code (it’s a framework) • More templates > More conditional code • 100% addative • Developer-friendly abstraction levels
  4. 4. Lots of Directories! • DON’T PANIC • This is the same WordPress structure you know and love
  5. 5. Structure Posts Single Header Loop Content/ Excerpt Sidebar Comments Page Footer
  6. 6. Context Types • COMMENT = comment & user info
 (dir: comment) • POST = individual post/page info
 (dirs: content, excerpt - single) = type of page
 • GENERALsidebar, footer, loop, posts) (dirs: header,
  7. 7. General Templates Header, Sidebar, Footer • • • • • • • • • {dir}-default.php home.php search.php single.php page.php author.php author-{username}.php role-{role}.php type-{post-type}.php • • • • • category.php • • tax-{taxonomy-slug}.php cat-{slug}.php tag.php tag-{slug}.php tax-{taxonomy-slug}-
 {term-slug}.php single-{content}.php
 (cat, tag, author, meta, etc.)
  8. 8. Post Templates Content, Excerpt • • • • • • {dir}-default.php author-{username}.php meta-{key}-{value}.php meta-{key}.php format-{slug}.php tax-{tax-slug}-{termslug}.php • cat-{slug}.php • tag-{slug}.php • type-{post-type}.php • role-{role}.php • parent-{slug}.php • page.php • {feed-}(template).php
  9. 9. Single & Feed (Post Context) You can use the Post context template selection: • on single pages by prefixing with {single-}
 • in RSS and Atom feeds by prefixing with {feed-}
 (cat, tag, author, meta, etc.) (feed-format-status.php, etc.)
  10. 10. Comment Templates • • • • comment-default.php author.php user-{username}.php role-{role}.php • ping.php • meta-{key}-{value}.php • meta-{key}.php
  11. 11. Child Themes • Available templates are merged • Templates in child theme stomp those in parent theme
  12. 12. Example
  13. 13. Resources • GitHub Repos
 github.com/crowdfavorite/wp-carrington-core
 github.com/crowdfavorite/wp-carrington-core-docs
 github.com/crowdfavorite/wp-carrington-blueprint • Example Theme: FavePersonal
 crowdfavorite.com/favepersonal/ • Future: Tutorials and Reference Docs
 crowdfavorite.com/carrington-core/
 


×