WordPress as a CMS <ul><ul><li>Methods & Theme/Plugin Development </li></ul></ul>
Contact Information <ul><li>http://mattwalters.net/ </li></ul><ul><li>http://twitter.com/mwalters/ </li></ul><ul><li>http:...
WordPress as a CMS <ul><ul><li>WordPress </li></ul></ul><ul><ul><li>is  just  for </li></ul></ul><ul><ul><li>Blogging </li...
WordPress as a CMS <ul><ul><li>WordPress is </li></ul></ul><ul><ul><li>not  just for </li></ul></ul><ul><ul><li>Blogging <...
WordPress as a CMS <ul><ul><li>Pages </li></ul></ul><ul><ul><li>Posts </li></ul></ul><ul><ul><li>New Articles </li></ul></...
WordPress as a CMS <ul><ul><li>Examples </li></ul></ul>
WordPress as a CMS http://magazine.wsj.com/
WordPress as a CMS http://www.evsc.virginia.edu/
Theme Development <ul><li>Front End Development Best Practices </li></ul><ul><ul><li>Keep CSS in one file included via <li...
Theme Development <ul><ul><li>WordPress Codex </li></ul></ul><ul><ul><li>http://codex.wordpress.org/ </li></ul></ul><ul><u...
Theme Development <ul><li>Minimum of two files are required for a theme </li></ul><ul><ul><li>style.css </li></ul></ul><ul...
Theme Development <ul><li>Style.css </li></ul><ul><ul><li>Theme Name </li></ul></ul><ul><ul><li>Theme URI </li></ul></ul><...
Theme Development <ul><li>Functions.php </li></ul><ul><ul><li>Contains custom functionality for theme </li></ul></ul><ul><...
Theme Development Template Hierarchy Diagram
Theme Development Template Hierarchy Diagram
Theme Development <ul><li>Child Themes </li></ul><ul><ul><li>Style.css </li></ul></ul><ul><ul><ul><li>Template: <define pa...
Theme Development <ul><li>Base template structure </li></ul><ul><ul><li>get_header() </li></ul></ul><ul><ul><ul><li>Includ...
Theme Development <ul><li>The Loop </li></ul><ul><ul><li>Required in template files </li></ul></ul><ul><ul><li>Displays Po...
Theme Development <ul><li>bloginfo() / get_bloginfo() </li></ul><ul><ul><li>Useful to create dynamic references </li></ul>...
Theme Development <ul><li>Custom Fields </li></ul><ul><ul><li>Two Components </li></ul></ul><ul><ul><ul><li>Name / Value –...
Theme Development <ul><li>Using Custom Fields </li></ul><ul><ul><li>get_post_meta($post_id, $key, [boolean]) </li></ul></u...
Theme Development <ul><li>Theme Frameworks </li></ul><ul><ul><li>Carrington </li></ul></ul><ul><ul><li>Sandbox </li></ul><...
Theme Development <ul><ul><li>Questions? </li></ul></ul><ul><ul><li>(or funny jokes?) </li></ul></ul>
Upcoming SlideShare
Loading in...5
×

WordPress as a CMS

3,950

Published on

Matt Walters presentation from WordCamp RVA 2009 on using WordPress as a CMS / Theme Development

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

No Downloads
Views
Total Views
3,950
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
171
Comments
0
Likes
9
Embeds 0
No embeds

No notes for slide
  • WordPress as a CMS

    1. 1. WordPress as a CMS <ul><ul><li>Methods & Theme/Plugin Development </li></ul></ul>
    2. 2. Contact Information <ul><li>http://mattwalters.net/ </li></ul><ul><li>http://twitter.com/mwalters/ </li></ul><ul><li>http://twitter.com/atticusthedog </li></ul><ul><li>[email_address] </li></ul>
    3. 3. WordPress as a CMS <ul><ul><li>WordPress </li></ul></ul><ul><ul><li>is just for </li></ul></ul><ul><ul><li>Blogging </li></ul></ul>X
    4. 4. WordPress as a CMS <ul><ul><li>WordPress is </li></ul></ul><ul><ul><li>not just for </li></ul></ul><ul><ul><li>Blogging </li></ul></ul>
    5. 5. WordPress as a CMS <ul><ul><li>Pages </li></ul></ul><ul><ul><li>Posts </li></ul></ul><ul><ul><li>New Articles </li></ul></ul><ul><ul><li>Site Blog </li></ul></ul><ul><ul><li>Custom fields available for other content </li></ul></ul><ul><ul><li>Sidebars </li></ul></ul><ul><ul><li>Imagery </li></ul></ul><ul><ul><li>Ajax content </li></ul></ul>
    6. 6. WordPress as a CMS <ul><ul><li>Examples </li></ul></ul>
    7. 7. WordPress as a CMS http://magazine.wsj.com/
    8. 8. WordPress as a CMS http://www.evsc.virginia.edu/
    9. 9. Theme Development <ul><li>Front End Development Best Practices </li></ul><ul><ul><li>Keep CSS in one file included via <link> in the header </li></ul></ul><ul><ul><li>Keep Javascript in one file included in the footer </li></ul></ul><ul><ul><li>Use image spirites if possible </li></ul></ul><ul><ul><li>Use shorthand (padding vs padding-left/right) </li></ul></ul><ul><ul><li>Minify CSS/JavaScript if possible </li></ul></ul><ul><ul><li>Use appropriate compression for images </li></ul></ul>
    10. 10. Theme Development <ul><ul><li>WordPress Codex </li></ul></ul><ul><ul><li>http://codex.wordpress.org/ </li></ul></ul><ul><ul><li>Best Practices for distributing themes </li></ul></ul><ul><ul><li>Avoid packaging plugins </li></ul></ul><ul><ul><li>Support PHP 4 if possible :( </li></ul></ul><ul><ul><li>No paid advertisement </li></ul></ul>
    11. 11. Theme Development <ul><li>Minimum of two files are required for a theme </li></ul><ul><ul><li>style.css </li></ul></ul><ul><ul><li>index.php </li></ul></ul>
    12. 12. Theme Development <ul><li>Style.css </li></ul><ul><ul><li>Theme Name </li></ul></ul><ul><ul><li>Theme URI </li></ul></ul><ul><ul><li>Description </li></ul></ul><ul><ul><li>Version </li></ul></ul><ul><ul><li>Author </li></ul></ul><ul><ul><li>Author URI </li></ul></ul><ul><ul><li>Tags </li></ul></ul>
    13. 13. Theme Development <ul><li>Functions.php </li></ul><ul><ul><li>Contains custom functionality for theme </li></ul></ul><ul><ul><li>Can be procedural or Object Oriented </li></ul></ul><ul><ul><li>Can include plugin-like code </li></ul></ul><ul><ul><ul><li>Create settings page in admin area </li></ul></ul></ul><ul><ul><ul><li>Apply filters </li></ul></ul></ul><ul><ul><ul><li>Perform actions </li></ul></ul></ul><ul><ul><ul><li>etc </li></ul></ul></ul>
    14. 14. Theme Development Template Hierarchy Diagram
    15. 15. Theme Development Template Hierarchy Diagram
    16. 16. Theme Development <ul><li>Child Themes </li></ul><ul><ul><li>Style.css </li></ul></ul><ul><ul><ul><li>Template: <define parent theme> </li></ul></ul></ul><ul><ul><li>Other fields are same as a parent theme </li></ul></ul><ul><ul><li>Child theme templates override that of parent theme </li></ul></ul><ul><ul><li>Parent templates are inherited by child theme </li></ul></ul>
    17. 17. Theme Development <ul><li>Base template structure </li></ul><ul><ul><li>get_header() </li></ul></ul><ul><ul><ul><li>Includes header.php from theme directory </li></ul></ul></ul><ul><ul><li>The Loop </li></ul></ul><ul><ul><ul><li>Display content </li></ul></ul></ul><ul><ul><li>get_sidebar() </li></ul></ul><ul><ul><ul><li>Includes sidebar.php from theme directory </li></ul></ul></ul><ul><ul><li>get_footer() </li></ul></ul><ul><ul><ul><li>Includes footer.php from theme directory </li></ul></ul></ul>
    18. 18. Theme Development <ul><li>The Loop </li></ul><ul><ul><li>Required in template files </li></ul></ul><ul><ul><li>Displays Posts/Pages </li></ul></ul><ul><ul><li>Provides easy access to content data </li></ul></ul><ul><ul><ul><li>the_title() </li></ul></ul></ul><ul><ul><ul><li>the_content() </li></ul></ul></ul><ul><ul><ul><li>the_excerpt() </li></ul></ul></ul><ul><ul><ul><li>the_permalink() </li></ul></ul></ul><ul><ul><ul><li>the_tags/category </li></ul></ul></ul><ul><ul><ul><li>etc ... </li></ul></ul></ul>
    19. 19. Theme Development <ul><li>bloginfo() / get_bloginfo() </li></ul><ul><ul><li>Useful to create dynamic references </li></ul></ul><ul><ul><ul><li>Blog name </li></ul></ul></ul><ul><ul><ul><li>Description </li></ul></ul></ul><ul><ul><ul><li>Site URL </li></ul></ul></ul><ul><ul><ul><li>Stylesheet Directory (theme directory) </li></ul></ul></ul><ul><ul><ul><li>and more ... </li></ul></ul></ul>
    20. 20. Theme Development <ul><li>Custom Fields </li></ul><ul><ul><li>Two Components </li></ul></ul><ul><ul><ul><li>Name / Value – Basically key=>value pair </li></ul></ul></ul><ul><ul><li>Example Usage: </li></ul></ul><ul><ul><ul><li>Assigning images to Posts/Pages </li></ul></ul></ul><ul><ul><ul><li>Serve as a data source for Ajax content </li></ul></ul></ul><ul><ul><ul><li>Provide multiple content areas for a page </li></ul></ul></ul>
    21. 21. Theme Development <ul><li>Using Custom Fields </li></ul><ul><ul><li>get_post_meta($post_id, $key, [boolean]) </li></ul></ul><ul><ul><ul><li>$post_id = Primary key for Post/Page </li></ul></ul></ul><ul><ul><ul><li>$key = &quot;Name&quot; for custom field </li></ul></ul></ul><ul><ul><ul><li>[boolean] is optional </li></ul></ul></ul><ul><ul><ul><ul><li>True: Returns single string for $key </li></ul></ul></ul></ul><ul><ul><ul><ul><li>False: Returns array witch values for each $key matched </li></ul></ul></ul></ul>
    22. 22. Theme Development <ul><li>Theme Frameworks </li></ul><ul><ul><li>Carrington </li></ul></ul><ul><ul><li>Sandbox </li></ul></ul>
    23. 23. Theme Development <ul><ul><li>Questions? </li></ul></ul><ul><ul><li>(or funny jokes?) </li></ul></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×