all about word press

22
All About WordPress Dan Beil @add_action_dan Developer at Alley Interactive

Upload: dan-beil

Post on 17-Jul-2015

99 views

Category:

Internet


0 download

TRANSCRIPT

All About WordPressDan Beil

@add_action_danDeveloper at Alley Interactive

Hello, My name is Dan Beil- Web Developer at Alley

Interactive (NY, NY)- Previously a in-house dev at

Blue Earth Interactive- Freelanced for 4ish years- Benny and Mal

Ok, So what is WordPress?- Official mission is: To

Democratize publishing through Open Source, GPL Software

- Putting the power in your hands, giving you the freedom to decide what WordPress is for you

- Blog- Small Company Web Site- Large Company Web Site- Build a Mobile App on top- Use as a internal CRM- Create a social network with

BuddyPress

WordPress Core vs ThemesWordpress Core refers to what you get when you first install.

- Mostly a lot of background functionality

- A basic theme- Provides a foundation to

build off

Themes add all the fun stuff

- What is looks like- More functionality- Menus- Sidebars- Custom Post Types /

Taxonomies

Lets take a look...

WordPress Myths- It’s Free!

- Not entirely false though there

are many theme’s and plugins

which have a cost. Not to

mention the cost of

development / setup / training / copywriting / hosting / etc…

- It’s not secure- Security largely rests on

theme / plugin code quality as well as on the host

- It’s not professional- I beg to differ ;P

- It’s slow- Again, a hosting and code

quality issue- I’ll be able to create my

dream site in a few hours- WordPress Dev’s are being

hired at an insane rate, WP is

both easy and hard at the same time

Putting the team togetherNo Matter your position in the process, it’s crucial you work with the right people.

- What Designers should know about WordPress- Popular plugins / plugins that will be used- Logical data organization- Responsive design practices- At the very least general CSS skills

Putting the team together- What Developer should know about WordPress

- Theme structure / Template Hierarchy - Frontend CSS / JS- Backend PHP- WordPress Coding Standards ( codex standards )- Version control: GIT / SVN ( even if working alone )

- Having a public GitHub

repo goes a long way toshowing experience

Picking a HostWordPress specific

- Pantheon- WPEngine- Flywheel- Siteground

In most cases the Client should own the hosting account and domain

The DeliverableThis is the thing you are paying for!

- Who installs WordPress- Where does the content come from- Where do images come from- Who updates the DNS

Often overlooked Design stuffIt’s ‘easy’ to design with perfect content in mind: Perfect Post Title lengths, great images, Lorem Ipsum excerpts; But what happens in the real world?

STUFF BREAKS

Accounting for crazy contentDont worry, we (WordPress) got ya covered!

WordPress’ Theme Unit Testing data was designed to test most content situations that you can run across.

http://codex.wordpress.org/Theme_Unit_Test

Covers situations like:

- long titles, short titles, vertical / horizontal featured images, images that are ‘too big’, Image alignment, audio / video formats

Accounting for crazy real world contentUsing WordPress’ Theme Unit Testing Data allows both designers and developers see what hasn’t been accounted for.

Bad Good

Lets break some designs

WordPress Developer StuffIf you’re not a developer…

Don’t worry, you should probably at least be familiar with some of these terms.

- Multiple Loops- WP_Query versus get_posts- CPT’s and Taxonomies- Transients (caching)

Multiple LoopsAnytime you’re showing posts in WordPress you may be using The Loop

- Multiple / Nested Loops per page require a little more consideration

- wp_reset_postdata();- http://codex.wordpress.org/The_Loop#Nested_Loops

WP_Query versus get_posts();The fundamental difference between these two functions is WHAT you are doing with the posts.

- The general rule is IF you can use WP_Query, use it, along with standard template tags like the_title(); - this allows for other filter to be applied easily to your Loops.

- get_posts is more appropriate if you just need small pieces on data from each post (title and featured image).

- Using the argument of ‘fields’ => ‘ids’ can greatly speed up both of these functions, but requires more work later.

Transient #AllTheThingsTransients are a great way to accounting for heavy queries that cannot be avoided.

- Category / taxonomy queries- Meta Queries- Many posts

Usually take about 4 lines of code.

More Transientsif ( false === ( $our_query = get_transient( ‘transient_key’ ) ) ) {

$content = new WP_Query( $args );

set_transient( ‘transient_key’, $content, 2 * HOUR_IN_SECONDS );

}

return $our_query;

Class Coding (getting started with OOP)http://addactiondan.me/category/code/

class Our_Class {

public function __construct() {

add_action( ‘init’, array( $this, ‘register_post_type’ );

}

public function register_post_type() { … }

}

new Our_Class();

Dan Beil@add_action_dan

Developer at Alley Interactive

Thank You