structure style-story

35
Structure, style, story: what goes where?

Upload: wordcamp

Post on 17-Aug-2015

32 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: Structure style-story

Structure, style, story: what goes where?

Page 2: Structure style-story
Page 3: Structure style-story

Why do we care?

Page 4: Structure style-story

When we put the right things in the right places, we make a site

Faster.

Better for SEO.

More secure.

Easier to maintain.

Easier to update.

Easier to redo when the time comes.

And just maybe, less likely to bite us in the butt!

Page 5: Structure style-story

Anatomy of a WordPress site.

StyleStructure Story

Page 6: Structure style-story

Anatomy of a WordPress site.

StyleStructure Story

Page 7: Structure style-story

Structure.

Page 8: Structure style-story

Structure.

PHP files.

Site architecture.

Page 9: Structure style-story

Code.

PHP:

Runs the Loop.

Processes the database.

Controls the markup.

Does app stuff.

Page 10: Structure style-story

Site architecture.My rules:

Every piece of material is a post.

Organizing the site == organizing posts into:

Pages.

Widgets.

Page 11: Structure style-story

For example.

Page 12: Structure style-story
Page 13: Structure style-story
Page 14: Structure style-story
Page 15: Structure style-story

Two roads to the same bar.

Page 16: Structure style-story

See?

Page 17: Structure style-story
Page 18: Structure style-story

Style.

Page 19: Structure style-story

Style.

CSS.

jQuery.

Presentational markup.

Page 20: Structure style-story

CSS.

Page 21: Structure style-story

jQuery.

Page 22: Structure style-story

Presentational PHP.Lays out HTML

in a page template.

Page 23: Structure style-story

page-pros.php

Page 24: Structure style-story

To php or not to php?

Page 25: Structure style-story

What if you want to get rid of something?

Page 26: Structure style-story

To php or not to php?

Page 27: Structure style-story

shame.cssdisplay: none;

visibility: hidden;

!important;

ID selectors

And … ?

Page 28: Structure style-story

Story.

Page 29: Structure style-story

Story.

Content?

To us, maybe – an afterthought.

To site owner, the whole point of the site.

Page 30: Structure style-story

Story.Every piece, a post.

HTML in the WP Editor.

Embed media files.

Page 31: Structure style-story

About home pages.What’s wrong with this picture?

Copy blocks hard-coded into home.php

New stuff on the site never shows up here.

SEO implications.

Page 32: Structure style-story
Page 33: Structure style-story

About home pages.What should happen instead?

Widgets.

Featured posts, products.

front-page.php

Page 34: Structure style-story

StyleStructure Story

CSSPHP HTML

Page 35: Structure style-story

Mary Baum @marybaum