11 amazing things i learnt at word camp sydney 2014
TRANSCRIPT
Contribute to WordPress• Core
• UI
• Accessibility
• Mobile
• Support
• Polyglots
• Themes
• Documentation
• Community
• Plugins
• Training
• Meta
make.wordpress.org
CSS Naming Conventions
Why?!• Avoid Conflicts
• Meaningful Descriptive Names
• Infer HTML from CSS
• Avoid Clashes With WP Core
• More Efficient Code
Two Naming Conventions• BEM
• Block, Element, Modifier
• e.g. .single-post__entry-title—entryTitleHover
• Suit CSS
• Pascal Case (Best to avoid conflicts)
• e.g. .SinglePost-entryTitle_entryTitleHover
Scripts & Styles• Don’t put directly in head or footer = BAD
• Enque = GOOD
• wp_register_script
• wp_enque_script
• wp_register_style
• wp_enque_style
Prefixing
• Prefix functions with your theme or plugin slug - a Unique Name
• Avoids conflicts, fatal errors and the white screen of death
Sanitizing & Escaping• echo home_url(); <= Don’t Do This
• echo esc_url( home_url () ); <= Do This
• Stops malicious code being injected
codex.wordpress.org/Validating_Sanitizing_and_Escaping_User_Data#Escaping:_Securing_Output
Yoda Conditions
Protection against simple mistakes
if ( true === $the_force ) { $victorious = you_will( $be );}
Use BracesAlways use braces, even where not required.
Not this:
if ( condition() ) return true;
This:
if ( condition() ) { return true;}
Check Code Standards
github.com/WordPress-Coding-Standards
Theme And Plugin Localisation
• Allow your theme and plugin to be translatable
• Other people will do the translations
WHY?!
• Only 27% Internet Users Speak English
• Double Your Conversion Rate
Popping The Bonnet and Getting Your Hands Dirty
• Use Child Themes rather than modifying a theme
• SALT
• Jump Into CODEX and learn
99 Ways To Optimise WordPress Performance
• MaxCDN or Cloudflare
• W3 Total Cache
• Good Host
• Host close to most of your customers
• Use Pingdom to check site performance
• WebPageTest.com for finer details of speed testing
• YSLOW or Google Page Speed
• Minimise HTTP Requests - check timeline in webdev tools
• Better WordPress Minify Plugin (Test is works properly)
• Apply the 70/30 Image Compression rule(70% image quality - if OK then drop it down to 35%)
• Compress Images - Use PNG Gauntlet
• Use ImageOptim for Mac
• …and more
goo.gl/NZ3kxt
Don’t Do It All • Delegate & Outsource (zirtual.com)
• Do A Task Once Then Delegate
• Screenflow task
• Upload to Vimeo
• VA write the system
Create And Lead A Tribe
• Podcasting
• Publish regularly and Often
• Become to leader in you field
• Narrow your market
• Know your client
Mastering Custom Post Types
• Make It Easy For Clients To Manage
• Avoid Shortcode Hell
• Use WP_Query to manipulate data (See Codex)
SEO!
• Now called “Inbound Marketing”
• Panda = Relevant Content
• Penguin = Links
• Hummingbird = Search Intent (looking for related words on the page to support the keyword)
• 1. Change Permalinks to post-name
• 2. Use - not _ in image and page names
• 3. “www” or "not www"
• 4. Set up Google Webmaster Tools
• 5. Use HTTPS rather than HTTP
• 6. Setting > Reading - uncheck discourage box
• 7. Yoast WP SEO
• 8. http://bit.ly/ZhsTvG (http://onlinemediamasters.com/yoast-wordpress-seo-tutorial/)
• 9. For keyword research http://www.wordpot.com/andhttp://www.keyword.io/
• 11. Don’t bother with keywords, not used by Google any more
• 12. Write for peoplefirst then Google
• 13. Synonyms in H2 - H6 Tags
• 14. Use Bullets
• 15. Use Subheaders every 2 paragraphs
• 16. Internal Links are important
• 17. Keep important content a close to top level as possible
• 18. http://www.wordle.net/ for readability
• 19. Name image descriptively
Hiring Remote Workers• Cheap for you
• Great Pay For Them
• It Is a numbers game
• Advertise => Sift and Filter => Interview => Select 5 => Hire On Paid Trial => Keep the best, sack the rest
Remote Tips• Be aware of language differences
• Developer vs Programmer
• Ask “What Do You Really Like To Do”
• Project Management Software
• Use Bonuses As Incentives and Rewards
• Buy Stuff They Need
• Hire FullTime / Never Part Time
• Use Project Management Software
<?php /** * Plugin Name: Name Of The Plugin ! * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates ! * Description: A brief description of the Plugin. ! * Version: The Plugin's Version Number, e.g.: 1.0 ! * Author: Name Of The Plugin Author ! * Author URI: http://URI_Of_The_Plugin_Author ! * License: A "Slug" license name e.g. GPL2 */
Writing Plugins• See Tutorial in Codex
• http://codex.wordpress.org/Plugin_API/Action_reference
• http://codex.wordpress.org/Plugin_API/filter_reference
• WordPress Hooks are listed in Codex in the order they fire.
Action vs Filters• ACTIONS => firing code at certain points in time
• FILTERS => Changing The Value of something (Always Return; the value)
• Minimalist Development => Use WordPress Hooks
• Use a Text Domain to allow for localisation/translations
Functions or Plugin
• Functions for theme specific modifications
• Plugins for modifications regardless of the theme
What I Learned About Project Management from a Gangster
- Ben Madden
• What Is The Longest Job You Have Incomplete
• Don’t put up with client excuses.
• Take charge and Manage the job and client
• Read: mattersolutions.com.au/blog/2014/09/project-management-gangster
Accessible Websites !
- Gian Wild
• Many resources to assist with accessibility can be downloaded from
AccessibilityOz.com.au
Good Grammar Counts !
- Kate Toon• Use compelling headlines
• Check grammar and spelling
• Related images
• Good content
• Write naturally
Methods of Migrating Sites
• WP DB Migrate Pro
• VaultPress
• Manual Migration & Search and Replace PHP Script
• Take a screenshot of WP Settings Widgets and keep on file for Disaster Mitigation