Building custom theme/plugin functionality using powerful built-in core API's / libraries. Thinking about things in terms of core functionality and rolling your own.
18. What’s in a slide?
2 Headline & Text
Lorem ipsum dolor sit
amet, consectetur
adipiscing elit.
Curabitur porttitor
tempor dui.
1
Banner/Image 3 Call to Action/Button »
19. Custom Post Type
These pieces map perfectly to a custom post
type with minimal custom fields.
20. Mapping Fields
Slide Data Custom Post Type
Banner/Image Featured Image
Headline Post Title
Text Post Content
Call to Action Text Custom Field or Post Content
Call to Action URL Custom Field or Post Content
Slide Order Menu Order
Display/Hide Publish Status*
* We could use a custom taxonomy
45. But What If?
You’ve got custom HTML/CSS already.
You can’t duplicate it with [gallery].
46. Use/Hack Plugins?
Could be bloated code.
Could be insecure.
Could take longer.
47. Image Attachments.
They’re a post type.
You can query ‘em.
You can do anything with ‘em.
48. Galleries of Galleries.
Photo Galleries parent page can
list all child pages (galleries).
Can display photos via templates or
quick call shortcode API.
50. Pulling Gallery
Pages
// Loop through $galleries and use
// get_the_post_thumbnail($id, ‘size’);
// to pull the featured image
// Output with your custom markup!