11 amazing things i learnt at word camp sydney 2014

58
11 Amazing Things I Learnt At Whistle Stop Tour Of Key Learnings

Upload: wordpressbrisbane

Post on 14-Jul-2015

130 views

Category:

Technology


1 download

TRANSCRIPT

11 Amazing Things I Learnt At

Whistle Stop Tour Of Key Learnings

It’s All About You !

- Dee Teal

Contribute to WordPress• Core

• UI

• Accessibility

• Mobile

• Support

• Polyglots

• Themes

• Documentation

• Community

• Plugins

• Training

• Meta

make.wordpress.org

– Dee Teal

“The best, most incredible part of all of contributing is the amazing people I’ve met.”

2 Streams

Tech Stream

User Stream

1. CSS Naming Conventions !

Peter Wilson

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

Read More…

CSSNamingConventions.com

2. Best Practice For WordPress Coding

!

Luke Carbis

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

AJAX

• Localise Your Scripts

• wp_localize_script

• makes it translatable

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

Coding Standards

Use Tab not Space

Yoda Conditions

Protection against simple mistakes

if ( true === $the_force ) { $victorious = you_will( $be );}

Make Life Easy Later

Make Code readable rather than clever

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

3 Steps To Becoming An Awesome Coder

Read Code

Have Your Code Peer Reviewed

Refactor Your Old Code

3. Theme And Plugin Localisation !

Brian Miyaji

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

Display In Other Languages

WPML Plugin to Serve Different Languages

Translate Pages

4. Popping The Bonnet and Getting Your Hands Dirty

!

Scott Huntley

Popping The Bonnet and Getting Your Hands Dirty

• Use Child Themes rather than modifying a theme

• SALT

• Jump Into CODEX and learn

5. 99 Ways To Optimise WordPress Performance

!

James Banks

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

6. The Internet Of Things !

Steve Cooper

PayPal + WooCommerce+Cafe

Swipe - No TouchHygienic For Cafes

7. Being The Leader Of Your Tribe !

Troy Dean

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

8. Mastering Custom Post Types !

Ajax McKerral

Mastering Custom Post Types

• Make It Easy For Clients To Manage

• Avoid Shortcode Hell

• Use WP_Query to manipulate data (See Codex)

9. SEO Is Easy !

Kate Toon

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

10. Remote Worker - !

Chris Ryan

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

11. Writing Plugins - Simple !

Frankie Jarrett

<?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

12. Planning For WordPress At Scale

Big Brand On WordPress

• Newscorp and WordPress

13. Lightening Talks

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

Unit TestingPHP Process for testing code

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

Big Brands On WordPress

WordPress.org/showcase

vip.WordPress.com

Speaker Slides

View and Download

goo.gl/itdzKv