Slide 1

Slide 1 text

FLEDGLING WORDPRESS DEVELOPER? LEARN PHP! CC image credit furryscalyman flickr

Slide 2

Slide 2 text

Peter Shackelford @pixelplow

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

CC image credit girlwparasol flickr My Awesome Blog

Slide 6

Slide 6 text

Themes CC image credit girlwparasol flickr

Slide 7

Slide 7 text

Plugins CC image credit megpi flickr

Slide 8

Slide 8 text

Why can’t I make it do… CC image credit justjenn flickr

Slide 9

Slide 9 text

The Loop CC image credit girlwparasol flickr

Slide 10

Slide 10 text

http://varyhelp.com/tutorial/list-of-template-hierarchy-with-example/ Template Hierarchy

Slide 11

Slide 11 text

Magic Black Box

Slide 12

Slide 12 text

Magic Black Box

Slide 13

Slide 13 text

Elementary CC image credit dynamosquito flickr

Slide 14

Slide 14 text

foreach ($colors as $color){ echo $color; } CC image credit vox flickr

Slide 15

Slide 15 text

foreach ($colors as $hair){ echo $hair; } CC image credit vox flickr

Slide 16

Slide 16 text

foreach ($colors as $alot){ echo $alot; } CC image credit vox flickr

Slide 17

Slide 17 text

CC image credit vox flickr

Slide 18

Slide 18 text

What does this mean‽ array(62) { ["page"]=> int(0) ["pagename"]=> string(13) "meet- your-rep" ["error"]=> string(0) "" ["m"]=> string(0) "" ["p"]=> int(0) ["post_parent"]=> string(0) "" ["subpost"]=> string(0) "" ["subpost_id"]=> string(0) "" ["attachment"]=> string(0) "" ["attachment_id"]=> int(0) ["name"]=> string(13) "meet- your-rep" ["static"]=> string(0) "" ["page_id"]=> int(0)… var_dump($wp_query->query_vars);

Slide 19

Slide 19 text

$args =array( key => value, key2 => value2, ); $args = array( 'post_type' => 'portfolio', 'post_status' => 'publish', ); Familiar?

Slide 20

Slide 20 text

$args =array( key => value, key2 => value2, ); $args = array( 'post_type' => 'portfolio', 'post_status' => 'publish', ); Familiar?

Slide 21

Slide 21 text

Messy elseif? Switch Case! switch ($zipcode) { case ( $zipcode >= $michigan->getZipmin() && $zipcode <= $michigan->getZipmax() ): echo "I am in Michigan!”; break; case ( $zipcode >= $ohio->getZipmin() && $zipcode <= $ohio->getZipmax() ): echo “I am in Ohio!”; break; } Check if $zipcode is in a state’s zip code range.

Slide 22

Slide 22 text

PostMethod CC image credit jason_coleman flickr if ( $_SERVER['REQUEST_METHOD'] == ‘POST'){ //do something }

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Sales Rep Zip Code Range Data Model

Slide 25

Slide 25 text

zip code GO! Find your vendor Web UI Sales Rep Zip Code Range Data Model

Slide 26

Slide 26 text

1. Create form field. 2. Show field if $_SERVER[‘REQUEST_METHOD' != ‘POST' 3. Validate and sanitize $zipcode 4. Pass $zipcode into function 5. Get the template part if $_SERVER[‘REQUEST_METHOD' == ‘POST' General Steps

Slide 27

Slide 27 text

Good old fashioned book learning

Slide 28

Slide 28 text

The Interwebs W3 Schools The Google

Slide 29

Slide 29 text

Functionality Plugins

Slide 30

Slide 30 text

Page Templates