SlideShare uma empresa Scribd logo
1 de 24
WordPress as a CMS
Justin Sisley
justin.sisley@gmail.com
www.justinsisley.com

Matthew Vaccaro
mattyvac@gmail.com
www.matthewvaccaro.com




“Make an enterprise
level CMS out of
WordPress?”
Wiki Says…

   Wordpress as a CMS
The Definition of a CMS

A web content management system (WCMS)[1] is a
software system that provides website authoring,
collaboration, and administration tools designed to allow
users with little knowledge of web programming
languages or markup languages to create and manage
website content with relative ease. - Wikipedia




                        Wordpress as a CMS
A Brief History

      Wordpress as a CMS
…a [very] brief history.
    “WordPress was born out of a desire for an elegant, well-architectured personal
    publishing system built on PHP and MySQL and licensed under the GPLv2 (or later). It is
    the official successor of b2/cafelog. WordPress is fresh software, but its roots and
    development go back to 2001. It is a mature and stable product. We hope by focusing on
    user experience and web standards we can create a tool different from anything else out
    there.” – wordpress.org/about/




                                            Serious Blogging


    Serious Forking


                                                                      Serious CMSing


                                      Wordpress as a CMS
Why You’re Here


      WordPress as a CMS
…and why we’re here.
WordPress today
• Robust, customizable platform that is very CMSish
• Allows the use of many core CMS principles such as media re-use and
  workflow

WordPress is not just a blog platform...
• ...and is not just a convenient CMS for small client projects, it’s much more!
• Some may be doing this already:
   – Network of client sites for ease of updating
   – Network of blogs under one media company
• ….but what about HUGE single sites!?




                                     Wordpress as a CMS
“You’re gonna
need a bigger
CMS” –Brody




        Wordpress as a CMS
Why We Chose WordPress

What we were up against:
• Enterprise systems based on .NET and ColdFusion
• Ektron, SiteCore, etc.
• ‘Enterprise mentality’
• Enterprise

What we needed:
• Dynamically driven (database) content
• Ability for multiple users to update the website
• Easier integration of social media and API’s
    – Brightcove, Flickr, etc.
• Better navigation and information architecture
• More modern responsive design
• Integrated search and knowledge base


                                 Wordpress as a CMS
“Say ‘enterprise’
again. Say ‘enterprise’
again, I dare you, I
double dare you.”
-Jules




            Wordpress as a CMS
Why We Chose WordPress
What we hoped to achieve:
• Stronger engagement of users
• Better, more timely, communication of information internally and externally
• Reflects the ‘21st Century’ college motto
• Better adapts to users needs
• More comprehensive metrics
and analytics collection




                                     Wordpress as a CMS
Why We Chose WordPress
 –   Cost
 –   Pre-existing knowledge, no consulting needed like proprietary systems
 –   Positive outlook for WP as a platform
 –   Massive community




                              Wordpress as a CMS
How We’re Using
WordPress

     Wordpress as a CMS
How We’re Using WordPress as a CMS
College of Medicine CMS design and development process

•   Desired functionality brainstorming
     – What features already exist
     – What features did we have to create for ourselves
     – Using third-party plugins vs. writing our own
            •   Use as few third party plugins as possible (Less than 5)

•   Multisite vs. single site considerations
     – Get_blog_list(); and switch_to_blog(); is bad! (Sort of, but let us explain…)
            •   Get_blog_(); is deprecated – and horrible
     –   Network search, or anything network wide

•   User roles, permissions and capabilities
     – Content Editor -> Content Manager -> Approver/Publisher
     – Remove options from users on a per role or per site basis (RoleScoper Plugin)

•   JavaScript
      – Ajax
      – Script management
      – Closures
      – Use only what you need


                                                     Wordpress as a CMS
How We’re Using WordPress as a CMS
Evolution of design

•   ‘Web 1.0’ to ‘Web 2.0’
•   Static to dynamic
•   Designing ‘for the group’




                                Wordpress as a CMS
How We’re Using WordPress as a CMS
TA-DA!
                                     Custom
                                     wp_list_pages
                                     functions, jQuery
                                     audience panel




                                    Custom fields,
                                    custom post
                                    type events
                                    calendar




               Wordpress as a CMS
How We’re Using WordPress as a CMS
Evolution of design                                                    /*** @group general ***/
• Theming and templates                                                ::-moz-selection {
                                                                          background-color: #9bd2f1;
     –   Not every page needs a template                                  color: #fff;
     –   Use PHP to your advantage when creating                       }
         templates                                                     /*** @group headings ***/
           •   Consolidate templates with statements                   h1 a, h2 a, h3 a {
                                                                          -webkit-text-stroke: 1px transparent;
                                                                       }
Design Considerations                                                  /*** @group header ***/
• Combine and minimize CSS and jQuery                                  header {
• Use markers in CSS (@group)                                             overflow: auto;
                                                                          margin-bottom: 10px;
• Includes make life easier                                            }
     –   @import for CSS                                                /*** @group universal bar style ***/
     –   <?php require_once ('includes/site-head'); ?>                 .grey-bar {
                                                                          border: 1px solid #ccc;
     –   <?php get_template_part('includes/site-head');                   font-size: 14px;
         ?>                                                               text-shadow: 0px 1px 0px #FFF;
                                                                       }
                                                                       /*** @group navigation - top ***/
                                                                       ul#top-navigation {
                                                                          overflow: hidden;
                                                                          width: 955px;
                                                                          z-index: 19999;
                                                                          margin: 0 auto;
                                                                          clear: both;
                                                                       }


                                                       Wordpress as a CMS
How We’re Using WordPress as a CMS
Make use of the WordPress functions!
•  …The ones above
•  wp_list_pages(); (wp_get_pages(); also rocks!)
•  get_queried_object();
•  get_top_ancestor();
…and TONS more


   <?php
   $bodyClass = get_body_class();
   $currPageID = get_the_ID();
   $currPageActive = get_top_ancestor($currPageID);
   $activeClass = 'activeNav';

   if (in_array("root-parent-id-".$currPageActive, $bodyClass) && $currPageActive == 8) {
   $aboutActive = $activeClass;
   }elseif(in_array("root-parent-id-".$currPageActive, $bodyClass) && $currPageActive == 12) {
   $acadActive = $activeClass;
   }
   ?>

   <ul id="sideNavList">
       <li class="homeBackground"><a href="<?php bloginfo('url'); ?>" class="homeLink">Return Home</a></li>
       <li><a href="<?php echo get_permalink( 8 ); ?>" class="<?php echo $aboutActive; ?>">About</a>
         <ul class="children <?php echo $aboutActive; ?>">
           <?php side_nav_list_pages( 8 ); //custom function ?>
         </ul>
       </li>
   </ul>




                                                 Wordpress as a CMS
How We’re Using WordPress as a CMS
Security
•   Nonces
•   Mysql_real_escape_string
•   Theme security = plugin security!
       –    functions.php is just as important as a plugin
       –    Escaping non-plugin and non-functions.php code when using code within themes
•     Awareness is key

    <?php

    $rss = fetch_feed('http://www.external-url.com/feed/?post_type=news');

    if (!is_wp_error( $rss ) ) :
          $maxitems = $rss->get_item_quantity(7);
          $rss_items = $rss->get_items(0, $maxitems);
    endif; ?>

    <ul>

    <?php if ($maxitems == 0 ) echo $rss->get_error_message();
          else foreach ( $rss_items as $item ) : ?>

    <li> <a href='<?php echo esc_url( $item->get_permalink() ); ?>' title='<?php echo 'Posted '.$item->get_date('j
    F Y | g:i a'); ?>'> <?php echo esc_html( $item->get_title() ); ?></a> </li>

    <?php endforeach; ?>

    </ul>




                                                       Wordpress as a CMS
How We’re Using WordPress as a CMS
Backups
• CRON is your friend!

Multi-server deployment
• Separate environments (development, staging, production)
• DB Syncing
    – Production to development every night (CRON)

Revisions & Version Control
• Capistrano, git, etc.
• SVN is getting older; distributed is getting newer.




                                       Wordpress as a CMS
How We’re Using WordPress as a CMS

Content organization strategies
• Custom post types
   – Cutting the ‘blog’ out of WordPress
• Custom fields
• Naming documents (meta data)

Authoring and publishing workflow
• Revisions and review process
• Push users to create and update content



                              Wordpress as a CMS
How We’re Using WordPress as a CMS

Upkeep & Maintenance
• Email alert system ‘page out of date’
• Queries
• Remove old revisions and empty the trash



  DELETE a,b,c
  FROM wp_posts a
  LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
  LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
  WHERE a.post_type = 'revision'



                                   Wordpress as a CMS
TO THE FUTURE!


     Wordpress as a CMS
But what about…the future, man?

• Exponential content growth
  – When someone can, they will
  – Old information gets archived, new information is
    created
• Cosmetic progression
  – Keeping up with the cool kids
• Workflow
• Maintenance



                       Wordpress as a CMS

Mais conteúdo relacionado

Mais procurados

Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenJapo Domingo
 
An Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp PhoenixAn Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp Phoenixvegasgeek
 
Part1 learn thelingo
Part1 learn thelingoPart1 learn thelingo
Part1 learn thelingoTaneya Koonce
 
WordPress Theme Development Basics
WordPress Theme Development BasicsWordPress Theme Development Basics
WordPress Theme Development BasicsTech Liminal
 
Understanding WordPress Multisite
Understanding WordPress MultisiteUnderstanding WordPress Multisite
Understanding WordPress MultisiteRyan Imel
 
Devendra 10 years_php_linux_mysql_team_client_handling
Devendra 10 years_php_linux_mysql_team_client_handlingDevendra 10 years_php_linux_mysql_team_client_handling
Devendra 10 years_php_linux_mysql_team_client_handlingdkschoudhary
 
Introducing MongoPress
Introducing MongoPressIntroducing MongoPress
Introducing MongoPressMark Smalley
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeSuzanne Dergacheva
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinSuzanne Dergacheva
 
Introducing MongoBase
Introducing MongoBaseIntroducing MongoBase
Introducing MongoBaser1dotmy
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond bloggingJulien Minguely
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DaySuzanne Dergacheva
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreSuzanne Dergacheva
 
Tech 802: Web Design Part 2
Tech 802: Web Design Part 2Tech 802: Web Design Part 2
Tech 802: Web Design Part 2somisguided
 
MIE Toolbox, a Case for Drupal as an Application Framework
MIE Toolbox, a Case for Drupal as an Application FrameworkMIE Toolbox, a Case for Drupal as an Application Framework
MIE Toolbox, a Case for Drupal as an Application FrameworkLev Tsypin
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme ReviewCatch Themes
 
The WordPress University
The WordPress UniversityThe WordPress University
The WordPress UniversityStephanie Leary
 

Mais procurados (20)

Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with Zen
 
An Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp PhoenixAn Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp Phoenix
 
Part1 learn thelingo
Part1 learn thelingoPart1 learn thelingo
Part1 learn thelingo
 
WordPress Theme Development Basics
WordPress Theme Development BasicsWordPress Theme Development Basics
WordPress Theme Development Basics
 
Understanding WordPress Multisite
Understanding WordPress MultisiteUnderstanding WordPress Multisite
Understanding WordPress Multisite
 
Devendra 10 years_php_linux_mysql_team_client_handling
Devendra 10 years_php_linux_mysql_team_client_handlingDevendra 10 years_php_linux_mysql_team_client_handling
Devendra 10 years_php_linux_mysql_team_client_handling
 
WordPress Multisite
WordPress MultisiteWordPress Multisite
WordPress Multisite
 
Introducing MongoPress
Introducing MongoPressIntroducing MongoPress
Introducing MongoPress
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
Introducing MongoBase
Introducing MongoBaseIntroducing MongoBase
Introducing MongoBase
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 
Emkane RCC wp qs
Emkane RCC wp qsEmkane RCC wp qs
Emkane RCC wp qs
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
 
Tech 802: Web Design Part 2
Tech 802: Web Design Part 2Tech 802: Web Design Part 2
Tech 802: Web Design Part 2
 
Ithemes presentation
Ithemes presentationIthemes presentation
Ithemes presentation
 
MIE Toolbox, a Case for Drupal as an Application Framework
MIE Toolbox, a Case for Drupal as an Application FrameworkMIE Toolbox, a Case for Drupal as an Application Framework
MIE Toolbox, a Case for Drupal as an Application Framework
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme Review
 
The WordPress University
The WordPress UniversityThe WordPress University
The WordPress University
 

Semelhante a Word Press As A Cms

Wordpress Workflow
Wordpress Workflow Wordpress Workflow
Wordpress Workflow Filippo Dino
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeDerek Christensen
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
Extending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPExtending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPrandyhoyt
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017Amanda Giles
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With LoveUp2 Technology
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command LineKelly Dwan
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and SecurityJoe Casabona
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityMichelle Davies (Hryvnak)
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentSitdhibong Laokok
 
Worcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20minsWorcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20minsChandra Prakash Thapa
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalChris Wu
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 Evan Mullins
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Developmentmwrather
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkExove
 
Theming Wordpress with Adobe
Theming Wordpress with AdobeTheming Wordpress with Adobe
Theming Wordpress with AdobeGrace Solivan
 
Wordpress website development
Wordpress website developmentWordpress website development
Wordpress website developmentJohn Faust
 

Semelhante a Word Press As A Cms (20)

The WordPress Way
The WordPress WayThe WordPress Way
The WordPress Way
 
Wordpress Workflow
Wordpress Workflow Wordpress Workflow
Wordpress Workflow
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to life
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
Extending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPExtending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHP
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command Line
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and Security
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & Security
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
 
Worcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20minsWorcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20mins
 
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 DrupalI use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 Drupal
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Development
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLsMobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
 
Theming Wordpress with Adobe
Theming Wordpress with AdobeTheming Wordpress with Adobe
Theming Wordpress with Adobe
 
Boost and SEO
Boost and SEOBoost and SEO
Boost and SEO
 
Wordpress website development
Wordpress website developmentWordpress website development
Wordpress website development
 

Word Press As A Cms

  • 1. WordPress as a CMS Justin Sisley justin.sisley@gmail.com www.justinsisley.com Matthew Vaccaro mattyvac@gmail.com www.matthewvaccaro.com “Make an enterprise level CMS out of WordPress?”
  • 2. Wiki Says… Wordpress as a CMS
  • 3. The Definition of a CMS A web content management system (WCMS)[1] is a software system that provides website authoring, collaboration, and administration tools designed to allow users with little knowledge of web programming languages or markup languages to create and manage website content with relative ease. - Wikipedia Wordpress as a CMS
  • 4. A Brief History Wordpress as a CMS
  • 5. …a [very] brief history. “WordPress was born out of a desire for an elegant, well-architectured personal publishing system built on PHP and MySQL and licensed under the GPLv2 (or later). It is the official successor of b2/cafelog. WordPress is fresh software, but its roots and development go back to 2001. It is a mature and stable product. We hope by focusing on user experience and web standards we can create a tool different from anything else out there.” – wordpress.org/about/ Serious Blogging Serious Forking Serious CMSing Wordpress as a CMS
  • 6. Why You’re Here WordPress as a CMS
  • 7. …and why we’re here. WordPress today • Robust, customizable platform that is very CMSish • Allows the use of many core CMS principles such as media re-use and workflow WordPress is not just a blog platform... • ...and is not just a convenient CMS for small client projects, it’s much more! • Some may be doing this already: – Network of client sites for ease of updating – Network of blogs under one media company • ….but what about HUGE single sites!? Wordpress as a CMS
  • 8. “You’re gonna need a bigger CMS” –Brody Wordpress as a CMS
  • 9. Why We Chose WordPress What we were up against: • Enterprise systems based on .NET and ColdFusion • Ektron, SiteCore, etc. • ‘Enterprise mentality’ • Enterprise What we needed: • Dynamically driven (database) content • Ability for multiple users to update the website • Easier integration of social media and API’s – Brightcove, Flickr, etc. • Better navigation and information architecture • More modern responsive design • Integrated search and knowledge base Wordpress as a CMS
  • 10. “Say ‘enterprise’ again. Say ‘enterprise’ again, I dare you, I double dare you.” -Jules Wordpress as a CMS
  • 11. Why We Chose WordPress What we hoped to achieve: • Stronger engagement of users • Better, more timely, communication of information internally and externally • Reflects the ‘21st Century’ college motto • Better adapts to users needs • More comprehensive metrics and analytics collection Wordpress as a CMS
  • 12. Why We Chose WordPress – Cost – Pre-existing knowledge, no consulting needed like proprietary systems – Positive outlook for WP as a platform – Massive community Wordpress as a CMS
  • 13. How We’re Using WordPress Wordpress as a CMS
  • 14. How We’re Using WordPress as a CMS College of Medicine CMS design and development process • Desired functionality brainstorming – What features already exist – What features did we have to create for ourselves – Using third-party plugins vs. writing our own • Use as few third party plugins as possible (Less than 5) • Multisite vs. single site considerations – Get_blog_list(); and switch_to_blog(); is bad! (Sort of, but let us explain…) • Get_blog_(); is deprecated – and horrible – Network search, or anything network wide • User roles, permissions and capabilities – Content Editor -> Content Manager -> Approver/Publisher – Remove options from users on a per role or per site basis (RoleScoper Plugin) • JavaScript – Ajax – Script management – Closures – Use only what you need Wordpress as a CMS
  • 15. How We’re Using WordPress as a CMS Evolution of design • ‘Web 1.0’ to ‘Web 2.0’ • Static to dynamic • Designing ‘for the group’ Wordpress as a CMS
  • 16. How We’re Using WordPress as a CMS TA-DA! Custom wp_list_pages functions, jQuery audience panel Custom fields, custom post type events calendar Wordpress as a CMS
  • 17. How We’re Using WordPress as a CMS Evolution of design /*** @group general ***/ • Theming and templates ::-moz-selection { background-color: #9bd2f1; – Not every page needs a template color: #fff; – Use PHP to your advantage when creating } templates /*** @group headings ***/ • Consolidate templates with statements h1 a, h2 a, h3 a { -webkit-text-stroke: 1px transparent; } Design Considerations /*** @group header ***/ • Combine and minimize CSS and jQuery header { • Use markers in CSS (@group) overflow: auto; margin-bottom: 10px; • Includes make life easier } – @import for CSS /*** @group universal bar style ***/ – <?php require_once ('includes/site-head'); ?> .grey-bar { border: 1px solid #ccc; – <?php get_template_part('includes/site-head'); font-size: 14px; ?> text-shadow: 0px 1px 0px #FFF; } /*** @group navigation - top ***/ ul#top-navigation { overflow: hidden; width: 955px; z-index: 19999; margin: 0 auto; clear: both; } Wordpress as a CMS
  • 18. How We’re Using WordPress as a CMS Make use of the WordPress functions! • …The ones above • wp_list_pages(); (wp_get_pages(); also rocks!) • get_queried_object(); • get_top_ancestor(); …and TONS more <?php $bodyClass = get_body_class(); $currPageID = get_the_ID(); $currPageActive = get_top_ancestor($currPageID); $activeClass = 'activeNav'; if (in_array("root-parent-id-".$currPageActive, $bodyClass) && $currPageActive == 8) { $aboutActive = $activeClass; }elseif(in_array("root-parent-id-".$currPageActive, $bodyClass) && $currPageActive == 12) { $acadActive = $activeClass; } ?> <ul id="sideNavList"> <li class="homeBackground"><a href="<?php bloginfo('url'); ?>" class="homeLink">Return Home</a></li> <li><a href="<?php echo get_permalink( 8 ); ?>" class="<?php echo $aboutActive; ?>">About</a> <ul class="children <?php echo $aboutActive; ?>"> <?php side_nav_list_pages( 8 ); //custom function ?> </ul> </li> </ul> Wordpress as a CMS
  • 19. How We’re Using WordPress as a CMS Security • Nonces • Mysql_real_escape_string • Theme security = plugin security! – functions.php is just as important as a plugin – Escaping non-plugin and non-functions.php code when using code within themes • Awareness is key <?php $rss = fetch_feed('http://www.external-url.com/feed/?post_type=news'); if (!is_wp_error( $rss ) ) : $maxitems = $rss->get_item_quantity(7); $rss_items = $rss->get_items(0, $maxitems); endif; ?> <ul> <?php if ($maxitems == 0 ) echo $rss->get_error_message(); else foreach ( $rss_items as $item ) : ?> <li> <a href='<?php echo esc_url( $item->get_permalink() ); ?>' title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'> <?php echo esc_html( $item->get_title() ); ?></a> </li> <?php endforeach; ?> </ul> Wordpress as a CMS
  • 20. How We’re Using WordPress as a CMS Backups • CRON is your friend! Multi-server deployment • Separate environments (development, staging, production) • DB Syncing – Production to development every night (CRON) Revisions & Version Control • Capistrano, git, etc. • SVN is getting older; distributed is getting newer. Wordpress as a CMS
  • 21. How We’re Using WordPress as a CMS Content organization strategies • Custom post types – Cutting the ‘blog’ out of WordPress • Custom fields • Naming documents (meta data) Authoring and publishing workflow • Revisions and review process • Push users to create and update content Wordpress as a CMS
  • 22. How We’re Using WordPress as a CMS Upkeep & Maintenance • Email alert system ‘page out of date’ • Queries • Remove old revisions and empty the trash DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision' Wordpress as a CMS
  • 23. TO THE FUTURE! Wordpress as a CMS
  • 24. But what about…the future, man? • Exponential content growth – When someone can, they will – Old information gets archived, new information is created • Cosmetic progression – Keeping up with the cool kids • Workflow • Maintenance Wordpress as a CMS