2. New book coming Fall
2014!
Content Strategy for WordPress
demonstrates how to build structured
content for higher ed sites.
Sign up to be notified when it’s out:
http://sleary.me/list
6. Common Situation
• No staff
• No budget
• No server
• Thousands of HTML files
• ... and broken links
• No search
• No RSS feeds
7. Advantages
• Easy UI for managing posts and pages
• Scheduled publishing
• Clean URLs
• Feeds for everything
• One-click upgrades
• Widgets and menus
• Thousands of free plugins and themes
8. Weaknesses
• Lacks native reusable content & network-
wide internal linking system
• Requires caching plugin, not included, to
optimize speed
• Critical plugins can fail as WP advances
• Disjointed and incomplete advanced
documentation
• Heavy use of pages can be problematic
• Lacks robust native workflow
9. Compared to other
CMSs
• Fast development cycles
• WP 3.0 to 3.1: 8 months
• 5-6 months more typical
• Drupal 6.0 to 7.0: 3 years
• Joomla 1.5 to 1.6: 3 years
• Cohesive, disciplined core developer
group
• UI focused on ease of use
10. Compared to other
CMSs
• Core features work very well
• Comments
• RSS and Atom feeds
• Permalinks
• File uploads
• Nonessential features relegated to
plugins
22. Media Uploads
• Limited to unpublicized list of MIMEs
• Easy to add or remove MIMEs
• Size/space limited by PHP, site settings
• Grouped into folders by date:
• wp-content/uploads/2012/10/file.jpg
• files/2012/10/file.jpg
30. Custom Fields
• Adding more information to posts
• Default input vs. custom meta boxes
• Examples: content audit notes
• Custom Meta Boxes class on GitHub
33. Taxonomies
• Extra sets of categories and tags
• tags, people, locations, departments
• People
• Locations
• Departments
36. Taxonomies
• Default taxonomies
• Categories
• Post Tags
• Menus
• Link categories
• Custom examples
• People
• Locations
• Departments
• Colleges
38. Post Types
• Things that are not
• blog posts, news
• pages, information about your
office
• Anything that needs to be
catalogued and displayed separately
39. Course Post Type
• Custom fields: arbitrary entry
• professor name
• email
• phone
• course code
• Taxonomies: selecting items from a list
• college
• department
46. Basic Installation
• Gather database information: name,
username, password
• Unzip files to server
• View in browser
• Fill in values
• Pass Go, collect $200
47. Network Setup
• Decide: subdirectories or subdomains?
• Wildcard DNS is not required if you are
not letting people sign up for new sites
on their own.
• Users already in the system can be
added to the new site.
• http://codex.wordpress.org/Create_A_N
etwork
56. Basic Theme Setup
• styles.css and index.php
• More specific files for each archive type:
• Single post, page, or custom post type
• Category and tag archives; custom taxonomies
• Date-based archives (day, month, year)
• functions.php turns on feature support; works
like mini-plugin
• header.php, footer.php, sidebar.php -- basic
includes
• comments.php
58. The Loop
• while (have_posts()) ... endwhile;
• Translation:
• if the invisible query found posts, then for
each post, print the following:
• the_title();
• the_content();
• etc.
59. Have Posts?
• What was requested?
• What was returned?
• How many posts were returned, and how
many are displayed on this page?
global $wp_query;
var_dump( $wp_query );
60. How this comes
together...
• You click a category link on a post.
• Based on your permalink structure, WordPress
knows you are requesting a list of posts in that
category. It queries the database.
• It finds 53 posts. Your Reading setting says 20
per page.
• WordPress assembles the first 20 posts' data,
plus links to two more pages.
61. Which template?
• Which theme file is used?
• category-slug.php
• category-id.php
• category.php
• archive.php
• index.php
• See Show Template plugin
62. Advanced Themes
Page templates
Conditional tags
Multiple sidebars
Widget areas
Theme options
Editor styles
Tips:
handling subcategories
without tons of files
conditional sidebars
63. Child Themes
/*
Theme Name: My Child Theme
Description: A child of Parent Theme
Version: 1.0
Author: Stephanie Leary
Template: parent
*/
@import url(../parent/style.css);
/* Overrides: */
64. Other Child Theme Files
• If template is present in child theme, it
will be used instead of parent theme’s
file
• BOTH functions.php files will be used
67. Theme Frameworks
• A complete theme with many options
• Page templates
• Specific archives
• Many widget areas
• SEO features
• custom fields for keywords
• title filters
• Genesis Google snippet preview
• Can be overridden by child themes
70. Building a Theme
1.Craft your HTML structure
2.Drop in WordPress template tags
• the_title()
• the_content()
• etc.
3.Move common elements into include
templates
• Header
• Footer
• Sidebars
• Search form
72. Conditional Tags
Conditional ID Slug Title Array Other
is_single X X X X
is_sticky X
is_page X X
is_page_template Filename
is_category X X X X
in_category X
is_tag X X X
75. Hooks
• Actions: places you can run your own
functions
• wp_head
• wp_footer
• Filters: things that can be altered with
your own functions
• the_title
• the_content
83. Evaluating Themes
and Plugins
• Search code for:
• base64()
• eval()
• include(../../wp-config.php)
• include(../../wp-load.php)
• Does it use updated libraries?
• wp_deregister_script( ‘jquery’ )
84. Evaluating Themes
and Plugins
• Are wp_head() and wp_footer() missing?
• Does it insert links you can’t remove?
• Does it pester you for commercial
upgrades?
85. Writing Secure
Themes and Plugins
• Use the Settings API
• Check user capabilities
• Check nonces and referrers
• Validate user input
• Escape output
86. Developer References
• Mark Jaquith’s
WordCamp
Phoenix
presentation
• Professional
WordPress Plugin
Development
89. Backing Up
• WP DB Backup (single sites, database
only)
• Backup Buddy (network, database and
files, $$)
90. Upgrading
• Do it! (But back up first.)
• If the FTP Settings screen appears, add direct
file method to your config file. (See Codex
page on wp-config.php.)
• Upgrading via Subversion
94. Security Precautions
• Make sure WP files are group-writeable,
not world
• directories: 644 or 664
• files: 755 or 775
• Set up permalinks and caching, then
make .htaccess not writeable
• Change admin username
• Change database table prefix from wp_
• Create a database user other than root
95. Security Precautions
• Move wp-config.php up one directory
• Limit administrators
• Use Members to create less privileged
roles
• Prevent bogus login attempts with Login
Lockdown
• Run WP Security Scan and Exploit
Scanner
• Monitor filesystem with File Monitor Plus
109. Development Philosophy
• 2.9, 3.0, 3.1, 3.5 are all major releases.
• 3.3.1 is a bugfix and security update.
• Old releases do not get security
updates.
• Core developers set feature agenda for
major releases based on Trac tickets,
known problems, and user surveys.
110. Development Philosophy
• Development schedule kept on
make.wordpress.org/core.
• Meetings once a week in #wordpress-
dev.
• If it can be covered by a plugin, let it.
Core is for features most people need,
or frameworks developers can build on.
• If you want it fixed sooner, patch it
yourself.
112. Support
• Active user forums on wordpress.org
• Individual plugin & theme developers
• Groups on LinkedIn
• huge Twitter population
• IRC channels
113. Support
• VIP Automattic (core creators)
• Third party vendors such as
MUSupport.net
• Core developers are also consultants
• WP-only hosts
• WP Engine
• Page.ly
• Sucuri.net security specialists
118. Open Source vs.
Commercial
Open Source
Low or no initial budget
outlay
Premium support
options available
Variety of custom
development options
--------------------------------
Shelley launched in 2009
with $2k
Commercial
High startup costs
Enterprise support
contracts available
Often contracted to the
CMS company
for customization
-------------------------------
Texas 2yr launching
OmniUpdate this year:
119. Importing
• Many importers other than built-in list
• Writing your own MySQL-based import
• HTML Import
• Merging single installs into networks
Obsolete plugins example: RB Internal Links. No longer necessary, was once hyper critical. Also, Genesis has made Page Links To unnecessary.
Shootout highlights\n \nWordPress releases take 5 to 8 months. \nFast development cycles do mean frequent updates. However, functions are always deprecated instead of being removed altogether, so plugins and themes don't break with every major release unless the developer did something stupid. Some simple plugins that use the APIs correctly have not needed an update since version 1.5 -- seven years ago.\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
The files will be grouped into folders unless you turn off that preference in Settings -> Media. The date is determined by the date of the associated post, not the date you upload the file!\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Taxonomies can be hierarchical -- like categories, where you can nest them -- or non-hierarchical -- like tags, where you just type new ones into a text field\n
\n
\n
Talk about SRD’s news and taxonomies\n
\n
Post types can also be hierarchical (like pages) or non (like posts).\n\nYou can specify which fields your type supports -- title, page attributes, excerpt, revisions, author, the big editor. You can turn those off, then use custom fields to add new ones. You'll have to customize your theme to display the additional stuff.\n
\n
\n
\n
\n
WordPress automatically generates feeds for just about everything. Most of the time, the feeds for posts and comments are the only ones you see. For anything else, just add /feed to the URL and see what happens! You can get feeds for categories, tags, combinations of tags...\n
... individual authors’ posts, post types (including pages!), taxonomy terms, and even search terms.\n
\n
I think we should point to some instructions/blogs about installation. Leave the slide, point them to a resource, move on.\n
Decide subdomain vs subdirectory. \n\nMake sure your server meets the requirements. \n\nChange the wp-config setting.\n\nAccess the network admin menu.\n
[screenshots: step 1 (wp-config stuff), step 2, Network Admin screens, single site options screen w/ plugin & theme permissions]\n
Stephanie - Domain plugins\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Don't use Thesis\n\nSK- talk about what a framework means on a network site, show child theme options, framework settings, etc. Talk about framework specific plugins.\n
\n
\n
\n
\n
These are the conditional tags (functions) that take arguments. Is_single can take an ID, slug, title, or array of any of those.\n
\n
\n
\n
\n
\n
\n
This is actually part of WordPress! You might have a common typo or misspelling on campus and you’d like to force the correction.\n
\n
\n
Common problems: Missing .htaccess file; bad permissions on wp-includes or wp-content; wp-includes didn’t completely upload; plugin conflicts or bad plugin/theme code.\n
Themes on Extend go through an extensive vetting process.\n\nPLUGINS DO NOT. Any moron can upload a plugin to the repository. However, they are monitored for evil code. Still, getting things from wordpress.org helps you avoid the nasty stuff.\n
Themes on Extend go through an extensive vetting process.\n\nPLUGINS DO NOT. Any moron can upload a plugin to the repository. However, they are monitored for evil code. Still, getting things from wordpress.org helps you avoid the nasty stuff.\n
\n
If you’re going to write plugins or themes with options, you need this book.\n
\n
\n
\n
Old versions do not get security fixes. You must stay up to date with WP and all the plugins and themes you have installed.\n\nAuto-upgrading is by far the easiest thing to do. If you need to FTP the files for some reason, be sure to skip wp-content and .htaccess.\n \nNinjas can stay updated via Subversion. The wp-config.php file can be moved up one directory level so you don't overwrite it. \n
High-traffic WordPress sites NEED caching, but it's not built in! Why? The developers want you to find the solution that works best for your site and server.\n
\n
\n
\n
see the Google spreadsheet on plugins for a good list of security-related plugins. Also, if you are the server administrator, make sure your PHP settings are correct. (Turn off register_globals, etc.)\n
\n
BuddyPress adds: extended profiles, friends, groups, private messaging, activity streams, forums -- and the users manage everything from the front end. Theming is much more complicated as a result.\n
With BuddyPress, you own the content on the social network. You won’t be surprised when the business model changes and your free network suddenly costs an arm and a leg, or your users are suddenly hit with ads you don’t curate. You can also integrate with campus single-sign on tools.\n
\n
\n
\n
Google Summer of Code project. It provides classes, assignments, gradebook, student/teacher roles and more. Today it isn’t ready to handle the courseware needs of a complete institution, but it’s worth trying out for faculty/staff CMS training and on-campus professional development.\n
\n
\n
\n
\n
\n
\n
This is reality, even if the wiki says otherwise.\n
This is reality, even if the wiki says otherwise.\n
\n
VIP Support - Automattic: http://goo.gl/DLlXR\n\nSK: Huge fan of premium plugins and themes because the support offered tends to be top notch. Communities build up around these. Good examples are Genesis and GravityForms.\n
VIP Support - Automattic: http://goo.gl/DLlXR\n\nSK: Huge fan of premium plugins and themes because the support offered tends to be top notch. Communities build up around these. Good examples are Genesis and GravityForms.\n
\n
\n
\n
Ask if anyone's planning to run on IIS... the info on permissions is pretty LAMP-centric.\n
Low/no initial budget outlay\n\nFocus spending on customization and meeting campus needs\n\nAvailable commercial/premium support\n\nPut Shelley's budget slide here against ~$52k to launch OmniUpdate at a 2 year school.\n \n[Stephanie's budget: a lot less than that. I think all we bought was a Gravity Forms dev license. Did use our slave -- er, student worker pretty hard for about a month during and after the launch.] \n