Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rapid CMS Enabled site development with Wordpress

Rapid CMS Enabled site development with Wordpress

Peter Kaizer

August 31, 2012
Tweet

More Decks by Peter Kaizer

Other Decks in Technology

Transcript

  1. What is Wordpress • Open source CMS • Written in

    PHP • MySQL database • Developed and maintained by Automatic • First version release in 2003 • 16.7% of the ENTIRE INTERNET is powered by WordPress. Friday, August 31, 12
  2. Who is powered by Wordpress • All Things Digital •

    Nytimes.com blogs • Mashable • Smashing Magazine • Techcrunch • Citizen Cope • Wheaton College Friday, August 31, 12
  3. Wordpress pros • Low barrier of entry • Good levels

    of abstraction • Good separation of presentation and data • Strong SEO built in • Plugins • Ease of customization • custom post types • custom taxonomies • featured images • custom fields • Ease of installation • Hosting options • Multi site option • Child Themes • Multiple authors • Jquery and other Javascript libraries included • Strong & engaged user community • Free • Usability Friday, August 31, 12
  4. Wordpress cons • Plugins • no built in e-commerce functionality

    • no built in personalization capability Friday, August 31, 12
  5. Wordpress hosting requirements • Runs best on an Apache web

    server • usually a Linux hosting environment • must have: • PHP 5.2.4 or greater • MySQL 5.0 or greater • The mod_rewrite Apache module Friday, August 31, 12
  6. Wordpress terms • Themes • Templates • Plugins • Sidebar

    • Admin Center • Posts • Pages • Custom Post types • Widgets • Tags • Custom Fields • Permalinks Friday, August 31, 12
  7. Wordpress architecture • Wordpress core files • Wordpress database •

    Themes • images • js files • Plugins • Uploads Friday, August 31, 12
  8. Wordpress architecture • Extensive APIs • Core relies on extensive

    API interface allowing quick and effective customization. • Can be overridden or modified by user-generated hooks and filters. • Feeds: • Supports RSS 1.0 (aka RDF), RSS 2.0 and ATOM specifications Friday, August 31, 12
  9. Enterprise Ready • Has been adapted to enterprise environments •

    Provides support for Active Directory authentication • user management • work-flow integration • scheduled backups Friday, August 31, 12
  10. Wordpress user roles • Super Admin - access to site

    network administration features controlling the entire network • Administrator - access to all the administration features • Editor - can publish and manage posts and pages as well as manage other users' posts, etc. • Author - can publish and manage their own posts • Contributor - can write and manage their posts but not publish them • Subscriber - can only manage their profile Friday, August 31, 12
  11. Wordpress site planning • Content type inventory • Pages •

    Posts • Custom post types • Widgets • Menus • Taxonomies • Categories • Tags • Links • Comments • Inventory fields • Title • Content • Excerpt • Featured image • Custom fields Friday, August 31, 12
  12. Custom post types • A custom post type is a

    representation of a type of content • Helps organize differing types of content • Create page templates to render unique content type • Don’t use just a a means of categorizing Friday, August 31, 12
  13. Wordpress emes • A Theme is the collection of files

    that work together to produce the look and feel of a Wordpress site. • Separates the presentation styles and template files from the system files so the site will upgrade without drastic changes to the visual presentation of the site. • Allows for customization of the site functionality unique to that Theme. • Allows for quick changes of the visual design and layout of a Wordpress site. Friday, August 31, 12
  14. Wordpress eme files • Live in subdirectories residing in site-root/wp-content/

    themes/ • Theme's subdirectory holds all of the Theme's stylesheet files, template files, and optional functions file (functions.php), JavaScript files, and images. • At the very minimum, a Wordpress Theme consists of two files: • style.css • index.php Friday, August 31, 12
  15. Approaches to emes • Modify an existing theme • Create

    a child theme of an existing theme • Use a starter theme • Use a theme framework • create a child theme to the framework • Full blown custom theme Friday, August 31, 12
  16. Creating a child theme • Create a new them folder

    in wp-content/themes • create a style.css file /* Theme Name: Twentyeleven Child Description: Child theme for the twentyeleven theme Author: Your name here Template: twentyeleven */ @import url("../twentyeleven/style.css"); Friday, August 31, 12
  17. Some things to do with the loop • The loop

    is mark up agnostic • Multiples loops • Query posts by • category • tags • custom post type • author • date Friday, August 31, 12
  18. e Wordpress loop 68 3.4.2 The Loop in Plain English

    "SKSLI KDYHBSRVWV "! "SKSZKLOH KDYHBSRVWV WKHBSRVW "! GLYFODVV SRVWLG SRVW"SKSWKHB,' "!! K!DKUHI "SKSWKHBSHUPDOLQN "! rel="bookmark" title="Permanent Link to <?php the_ WLWOHBDWWULEXWH "!!"SKSWKHBWLWOH "!D!K! "SKSHFKRJHWBSRVWBPHWD SRVW!,' 3RVW7KXPE  WUXH "! <p class="meta"> VSDQ!3RVWHGRQVSDQ!"SKSWKHBWLPH )M6 < "!VSDQ!E\VSDQ!"SKSWKHBDXWKRU "! </p> "SKSWKHBFRQWHQW 5HDG)XOO$UWLFOH "! S!"SKSWKHBWDJV 7DJV    EU! "! 3RVWHGLQ"SKSWKHBFDWHJRU\  "! "SKSFRPPHQWVBSRSXSBOLQN 1R&RPPHQWV   &RPPHQW  &RPPHQWV "!S! </div> "SKSHQGZKLOH"! "SKSQH[WBSRVWVBOLQN 2OGHU(QWULHV "! "SKSSUHYLRXVBSRVWVBOLQN 1HZHU(QWULHV "! <?php else : ?> K!1RWKLQJ)RXQGK! "SKSHQGLI"! Are there any posts published? Sorry, just had to ask, the rest of this code will go funky if there aren’t any. Begin the loop. This will cycle through the number of Posts you have set to display (under Settings > Reading). A header tag with an anchor link inside it. The text will be the title of the Post, and the link will be the permalink to the single Post page. A custom field that is attached to this Post is pulled out and displayed. In this case, the key of “PostThumb”, which returns an “LPJ!” tag symbolizing this Post. “Meta” information about the Post is displayed: the Month Day, Year the Post was published and the display name of the Author who wrote it. The full content of the Post is displayed. More meta information about the post is displayed: all the tags and categories given to this Post and the number of comments, which is a link to the commenting area. End of the loop If there are older or newer posts available, display links to them. No posts? (a failsafe) Better tell the people. All done. Friday, August 31, 12
  19. Wordpress and jquery The proper way to incluce jquery in

    a Theme <?php wp_enqueue_script('jquery'); ?> It’s easy. It creates a link to a file you know is there and you know works. It lets WordPress know that the requested file is successfully loaded. <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/myscript.js"></script> Friday, August 31, 12
  20. Plugins • Advanced Custom Fields • All in One SEO

    • Maintenance Mode • Contact Form 7 • Gravity Forms • W3 Total Cache • Google XML Site maps • Akismet comment spam protection Friday, August 31, 12
  21. Security • Keep core up to date • Limit use

    of plugins • Keep plugins up to date • Don’t use admin as the default admin user name • Use secure passwords • for user accounts and DB user • Edit .htaccess file to limit access • Change default table prefix from wp_ • Do DB backups • Limit login attempts • Consider some of the many security plugins Friday, August 31, 12
  22. Resources • General Wordpress resources: • http://wordpress.org/ • http://digwp.com/ •

    http://www.wpbeginner.com/ • http://wpmu.org/ • http://wpcandy.com/ • http://lorelle.wordpress.com/ • Themes: • http://themeshaper.com/ • Framework Themes: • Genesis • Woo Themes • Thematic • Starter Themes: • http://underscores.me/ • Starkers: http://bit.ly/QIyGDK • Super Hijinks: http://bit.ly/QIyC6T • Security: • http://akismet.com/ • http://vaultpress.com/ Friday, August 31, 12