際際滷

際際滷Share a Scribd company logo
Making the most of WordPress.
Where does the
time go?
 Static content sucks
 It takes time to maintain
 Youve got better things to do
Theres a feature
for that
 My aim is to give you an idea of what is
possible with WordPress.
 Menus
 Post types
 Widgets
 Post formats
Mmmmenus
Lists of links
really are
everywhere
on websites.
Ever hand-
coded one?
Yeah, me
too...
Mmmmenus
 Never hand code a menu again
 Dont worry about changing URLs
 CSS Hooks a-plenty me hearties
 Theme locations for different menus
 Menu widget
How-to-menu
How-to-menu
How-to-menu
Adding links
Check the boxes...
Click Add to menu.
How-to-menu
How-to-menu
How-to-menu
Theme locations
Primary Navigation is the
theme location and My
menu is a menu selected
from the dropdown.
The code:
functions.php:
register_nav_menu( 'primary', 'My Menu' );
header.php
wp_nav_menu( array( 'theme_location' => 'primary' ) );
Further reading:
http://codex.wordpress.org/Function_Reference/wp_nav_menu
Extending menus
 Custom Nav Walker Class
 Show the description field
 Show featured images from posts/pages
 Access other page/post custom fields
Post types, or rather, content
types
 Posts and pages are both post types
 As are attachments
 WordPress is built on its own API
 The same API is available to theme & plugin
developers
What problem do
they solve?
 Things that are neither posts nor pages
 Forums  bbPress plugin
 Properties
 Events
 Static blocks
 Landing pages
 Other applications
Register the hell out
of that post type
add_action('init', 'codex_custom_init');
function codex_custom_init() {
register_post_type('book', array(
'labels' => $labels,
'show_ui' => true,
'show_in_menu' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'supports' => array('title','editor','thumbnail')
) );
}
You can always cheat
 Themergency custom post type generator
 http://themergency.com/generators/wordpress-custom-post-types/
The post type admin
Modifying the
edit screen
Use the
metabox API
to add/remove
or reorder
metaboxes.
Example:
Blobs plugin
http://codex.wordpress.o
rg/Function_Reference/a
dd_meta_box
Metaboxes
add_meta_box( $id, $title, $callback, $post_type, $context, $priority,
$callback_args );
 $callback is a the name of a function that
displays the content eg. Form fields
 $context determines where the box appears eg.
side or normal
 $priority allows you to control the order boxes
appear in eg. high or low
Metaboxes
 Provide user friendly alternatives to custom
fields
 Server side validation for custom fields eg.
sanitize_title_with_dashes( $_POST[my_field] );
 Use the save_post action
 update_post_meta($post_id, $meta_key, $meta_value);
 Accessing post meta
 get_post_meta($post_id, $key, $single);
 get_post_custom();
More cheating
 Lots of tutorials out there
 http://www.netmagazine.com/tutorials/user-
friendly-custom-fields-meta-boxes-wordpress
 Or if youre not into coding
 http://wordpress.org/extend/plugins/more-fields/
Example:
Flickr
Gallery
Example:
Landing
Pages
Its got a widget
 Typically in a sidebar
 Can be anywhere in a theme  Widget areas
 Many plugins provide widgets
 Rapid prototyping of information architecture
A widget it has got
Widget
areas on
interconnecti
t.com make
up the home
page and
footer
section
Page widget (+ jQuery)
Text Widget
Posts widgets
Authors widget
Archive widget
Further reading:
http://codex.wordpress.org/Widgets_A
PI
Making sidebars
 register_sidebar( $args );
 Can be done programmatically
 Widget area per category, per page etc...
 Could even use a custom menu walker to
show widgets in a menu  mega menus!
Further Reading:
http://justintadlock.com/archives/2010/11/08/sidebars-in-wordpress
Post formats
 Differentiate content within a post type
 Think tumblr without the threat of tumbeasts
 Portable between themes
 Custom layouts for posts
Post formats
 Supported formats: Aside, Gallery, Link, Image,
Quote, Status, Video, Audio, Chat
add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );
 Per post type:
add_post_type_support( $post_type, 'post-formats' );
 In the loop:
has_post_format( $format );
There can be only one
Twentyten theme
gallery post format
Tumblr style themes
Auld
Wumblr
Shelf
In summary
 Menus take the pain out of site navigation
 Post types make WP suitable for many
applications
 Widgets make it easy to refine information
architecture
 Post formats are frickin cool
And its goodnight from him
Thanks for listening
Robert ORourke
http://sanchothefat.com
@sanchothefat

More Related Content

What's hot (8)

Best Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStart
Best Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStartBest Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStart
Best Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStart
Scott DeLoach
Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...
Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...
Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...
Scott DeLoach
Ves localshop
Ves localshopVes localshop
Ves localshop
Alena Dao
Session handling in php
Session handling in phpSession handling in php
Session handling in php
baabtra.com - No. 1 supplier of quality freshers
Dress Your WordPress with Child Themes
Dress Your WordPress with Child ThemesDress Your WordPress with Child Themes
Dress Your WordPress with Child Themes
Laurie M. Rauch
Intro To Sammy
Intro To SammyIntro To Sammy
Intro To Sammy
Brandon Aaron
Custom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpressCustom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpress
stimasoft
Codigo html revista
Codigo html revistaCodigo html revista
Codigo html revista
MRFREDDYSAN
Best Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStart
Best Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStartBest Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStart
Best Practices for Embedded UA - WritersUA 2012, Scott DeLoach, ClickStart
Scott DeLoach
Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...
Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...
Developing Context-sensitive Help for Web-based Applications - Scott DeLoach,...
Scott DeLoach
Ves localshop
Ves localshopVes localshop
Ves localshop
Alena Dao
Dress Your WordPress with Child Themes
Dress Your WordPress with Child ThemesDress Your WordPress with Child Themes
Dress Your WordPress with Child Themes
Laurie M. Rauch
Custom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpressCustom content types & custom taxonomies in wordpress
Custom content types & custom taxonomies in wordpress
stimasoft
Codigo html revista
Codigo html revistaCodigo html revista
Codigo html revista
MRFREDDYSAN

Similar to How to content manage everything (20)

Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
Kyle Cearley
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
Custom Fields & Custom Metaboxes Overview
Custom Fields & Custom Metaboxes OverviewCustom Fields & Custom Metaboxes Overview
Custom Fields & Custom Metaboxes Overview
East Bay WordPress Meetup
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Jonny Allbut
WordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child ThemesWordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child Themes
Michelle Ames
SMACSS Your Sass Up
SMACSS Your Sass UpSMACSS Your Sass Up
SMACSS Your Sass Up
Mina Markham
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
Stephanie Wells
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
Tomasz Dziuda
Wordpress workflow for an agency world
Wordpress workflow for an agency worldWordpress workflow for an agency world
Wordpress workflow for an agency world
Chris Lowe
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kek辰l辰inen
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
Evan Mullins
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101
Ted Kulp
Getting Started With WordPress Development
Getting Started With WordPress DevelopmentGetting Started With WordPress Development
Getting Started With WordPress Development
Andy Brudtkuhl
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Evan Mullins
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
WP 201   Custom Post Types - Custom Fields - WordCamp Columbus 2015WP 201   Custom Post Types - Custom Fields - WordCamp Columbus 2015
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
Joe Querin
WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
Zero Point Development
WordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus SmarterWordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus Smarter
Jonny Allbut
PSD to WordPress
PSD to WordPressPSD to WordPress
PSD to WordPress
Nile Flores
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
Kyle Cearley
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
Custom Fields & Custom Metaboxes Overview
Custom Fields & Custom Metaboxes OverviewCustom Fields & Custom Metaboxes Overview
Custom Fields & Custom Metaboxes Overview
East Bay WordPress Meetup
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Jonny Allbut
WordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child ThemesWordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child Themes
Michelle Ames
SMACSS Your Sass Up
SMACSS Your Sass UpSMACSS Your Sass Up
SMACSS Your Sass Up
Mina Markham
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
Stephanie Wells
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
Tomasz Dziuda
Wordpress workflow for an agency world
Wordpress workflow for an agency worldWordpress workflow for an agency world
Wordpress workflow for an agency world
Chris Lowe
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kek辰l辰inen
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
Evan Mullins
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101
Ted Kulp
Getting Started With WordPress Development
Getting Started With WordPress DevelopmentGetting Started With WordPress Development
Getting Started With WordPress Development
Andy Brudtkuhl
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Evan Mullins
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
WP 201   Custom Post Types - Custom Fields - WordCamp Columbus 2015WP 201   Custom Post Types - Custom Fields - WordCamp Columbus 2015
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
Joe Querin
WordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus SmarterWordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus Smarter
Jonny Allbut
PSD to WordPress
PSD to WordPressPSD to WordPress
PSD to WordPress
Nile Flores
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra

Recently uploaded (20)

Monitor Kafka Clients Centrally with KIP-714
Monitor Kafka Clients Centrally with KIP-714Monitor Kafka Clients Centrally with KIP-714
Monitor Kafka Clients Centrally with KIP-714
Kumar Keshav
Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...
Rajalingam Balakrishnan
LVM Management & Disaster Recovery - RHCSA+.pdf
LVM Management & Disaster Recovery - RHCSA+.pdfLVM Management & Disaster Recovery - RHCSA+.pdf
LVM Management & Disaster Recovery - RHCSA+.pdf
RHCSA Guru
What is Agnetic AI : An Introduction to AI Agents
What is Agnetic AI : An Introduction to AI AgentsWhat is Agnetic AI : An Introduction to AI Agents
What is Agnetic AI : An Introduction to AI Agents
Techtic Solutions
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
Assuring Your SD-WAN to Deliver Unparalleled Digital ExperiencesAssuring Your SD-WAN to Deliver Unparalleled Digital Experiences
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
ThousandEyes
Beginners: Radio Frequency, Band and Spectrum (V3)
Beginners: Radio Frequency, Band and Spectrum (V3)Beginners: Radio Frequency, Band and Spectrum (V3)
Beginners: Radio Frequency, Band and Spectrum (V3)
3G4G
Collab Space by SIB (Simple Is Beautiful)
Collab Space by SIB (Simple Is Beautiful)Collab Space by SIB (Simple Is Beautiful)
Collab Space by SIB (Simple Is Beautiful)
SipkyJayaPutra
Doctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdf
Doctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdfDoctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdf
Doctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdf
davidandersonofficia
Presentation Session 5 Transition roadmap.pdf
Presentation Session 5 Transition roadmap.pdfPresentation Session 5 Transition roadmap.pdf
Presentation Session 5 Transition roadmap.pdf
Mukesh Kala
How to Add Kaspersky to Another Computer?
How to Add Kaspersky to Another Computer?How to Add Kaspersky to Another Computer?
How to Add Kaspersky to Another Computer?
Kevin Pierce
Microsoft Power Platform in 2025_Piyush Gupta_.pptx
Microsoft Power Platform in 2025_Piyush Gupta_.pptxMicrosoft Power Platform in 2025_Piyush Gupta_.pptx
Microsoft Power Platform in 2025_Piyush Gupta_.pptx
Piyush Gupta
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
Fault-tolerant, distrbuted AAA architecture supporting connectivity disruption
Fault-tolerant, distrbuted AAA architecture supporting connectivity disruptionFault-tolerant, distrbuted AAA architecture supporting connectivity disruption
Fault-tolerant, distrbuted AAA architecture supporting connectivity disruption
Karri Huhtanen
THE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSE
THE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSETHE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSE
THE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSE
Abhiwan Technology
UiPath Automation Developer Associate 2025 Series - Career Office Hours
UiPath Automation Developer Associate 2025 Series - Career Office HoursUiPath Automation Developer Associate 2025 Series - Career Office Hours
UiPath Automation Developer Associate 2025 Series - Career Office Hours
DianaGray10
Leading a High-Stakes Database Migration
Leading a High-Stakes Database MigrationLeading a High-Stakes Database Migration
Leading a High-Stakes Database Migration
ScyllaDB
Towards value-awareness in administrative processes: an approach based on con...
Towards value-awareness in administrative processes: an approach based on con...Towards value-awareness in administrative processes: an approach based on con...
Towards value-awareness in administrative processes: an approach based on con...
Universidad Rey Juan Carlos
real time ai agent examples | AI agent development
real time ai agent examples | AI agent developmentreal time ai agent examples | AI agent development
real time ai agent examples | AI agent development
ybobbyyoung
Monitor Kafka Clients Centrally with KIP-714
Monitor Kafka Clients Centrally with KIP-714Monitor Kafka Clients Centrally with KIP-714
Monitor Kafka Clients Centrally with KIP-714
Kumar Keshav
Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...
Rajalingam Balakrishnan
LVM Management & Disaster Recovery - RHCSA+.pdf
LVM Management & Disaster Recovery - RHCSA+.pdfLVM Management & Disaster Recovery - RHCSA+.pdf
LVM Management & Disaster Recovery - RHCSA+.pdf
RHCSA Guru
What is Agnetic AI : An Introduction to AI Agents
What is Agnetic AI : An Introduction to AI AgentsWhat is Agnetic AI : An Introduction to AI Agents
What is Agnetic AI : An Introduction to AI Agents
Techtic Solutions
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
Assuring Your SD-WAN to Deliver Unparalleled Digital ExperiencesAssuring Your SD-WAN to Deliver Unparalleled Digital Experiences
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
ThousandEyes
Beginners: Radio Frequency, Band and Spectrum (V3)
Beginners: Radio Frequency, Band and Spectrum (V3)Beginners: Radio Frequency, Band and Spectrum (V3)
Beginners: Radio Frequency, Band and Spectrum (V3)
3G4G
Collab Space by SIB (Simple Is Beautiful)
Collab Space by SIB (Simple Is Beautiful)Collab Space by SIB (Simple Is Beautiful)
Collab Space by SIB (Simple Is Beautiful)
SipkyJayaPutra
Doctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdf
Doctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdfDoctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdf
Doctronic's 5M Seed Funding Pioneering AI-Powered Healthcare Solutions.pdf
davidandersonofficia
Presentation Session 5 Transition roadmap.pdf
Presentation Session 5 Transition roadmap.pdfPresentation Session 5 Transition roadmap.pdf
Presentation Session 5 Transition roadmap.pdf
Mukesh Kala
How to Add Kaspersky to Another Computer?
How to Add Kaspersky to Another Computer?How to Add Kaspersky to Another Computer?
How to Add Kaspersky to Another Computer?
Kevin Pierce
Microsoft Power Platform in 2025_Piyush Gupta_.pptx
Microsoft Power Platform in 2025_Piyush Gupta_.pptxMicrosoft Power Platform in 2025_Piyush Gupta_.pptx
Microsoft Power Platform in 2025_Piyush Gupta_.pptx
Piyush Gupta
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
Fault-tolerant, distrbuted AAA architecture supporting connectivity disruption
Fault-tolerant, distrbuted AAA architecture supporting connectivity disruptionFault-tolerant, distrbuted AAA architecture supporting connectivity disruption
Fault-tolerant, distrbuted AAA architecture supporting connectivity disruption
Karri Huhtanen
THE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSE
THE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSETHE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSE
THE FUTURE OF REAL ESTATE: EXPLORING THE METAVERSE
Abhiwan Technology
UiPath Automation Developer Associate 2025 Series - Career Office Hours
UiPath Automation Developer Associate 2025 Series - Career Office HoursUiPath Automation Developer Associate 2025 Series - Career Office Hours
UiPath Automation Developer Associate 2025 Series - Career Office Hours
DianaGray10
Leading a High-Stakes Database Migration
Leading a High-Stakes Database MigrationLeading a High-Stakes Database Migration
Leading a High-Stakes Database Migration
ScyllaDB
Towards value-awareness in administrative processes: an approach based on con...
Towards value-awareness in administrative processes: an approach based on con...Towards value-awareness in administrative processes: an approach based on con...
Towards value-awareness in administrative processes: an approach based on con...
Universidad Rey Juan Carlos
real time ai agent examples | AI agent development
real time ai agent examples | AI agent developmentreal time ai agent examples | AI agent development
real time ai agent examples | AI agent development
ybobbyyoung

How to content manage everything

  • 1. Making the most of WordPress.
  • 2. Where does the time go? Static content sucks It takes time to maintain Youve got better things to do
  • 3. Theres a feature for that My aim is to give you an idea of what is possible with WordPress. Menus Post types Widgets Post formats
  • 4. Mmmmenus Lists of links really are everywhere on websites. Ever hand- coded one? Yeah, me too...
  • 5. Mmmmenus Never hand code a menu again Dont worry about changing URLs CSS Hooks a-plenty me hearties Theme locations for different menus Menu widget
  • 8. How-to-menu Adding links Check the boxes... Click Add to menu.
  • 12. Theme locations Primary Navigation is the theme location and My menu is a menu selected from the dropdown. The code: functions.php: register_nav_menu( 'primary', 'My Menu' ); header.php wp_nav_menu( array( 'theme_location' => 'primary' ) ); Further reading: http://codex.wordpress.org/Function_Reference/wp_nav_menu
  • 13. Extending menus Custom Nav Walker Class Show the description field Show featured images from posts/pages Access other page/post custom fields
  • 14. Post types, or rather, content types Posts and pages are both post types As are attachments WordPress is built on its own API The same API is available to theme & plugin developers
  • 15. What problem do they solve? Things that are neither posts nor pages Forums bbPress plugin Properties Events Static blocks Landing pages Other applications
  • 16. Register the hell out of that post type add_action('init', 'codex_custom_init'); function codex_custom_init() { register_post_type('book', array( 'labels' => $labels, 'show_ui' => true, 'show_in_menu' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true, 'supports' => array('title','editor','thumbnail') ) ); }
  • 17. You can always cheat Themergency custom post type generator http://themergency.com/generators/wordpress-custom-post-types/
  • 18. The post type admin
  • 19. Modifying the edit screen Use the metabox API to add/remove or reorder metaboxes. Example: Blobs plugin http://codex.wordpress.o rg/Function_Reference/a dd_meta_box
  • 20. Metaboxes add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args ); $callback is a the name of a function that displays the content eg. Form fields $context determines where the box appears eg. side or normal $priority allows you to control the order boxes appear in eg. high or low
  • 21. Metaboxes Provide user friendly alternatives to custom fields Server side validation for custom fields eg. sanitize_title_with_dashes( $_POST[my_field] ); Use the save_post action update_post_meta($post_id, $meta_key, $meta_value); Accessing post meta get_post_meta($post_id, $key, $single); get_post_custom();
  • 22. More cheating Lots of tutorials out there http://www.netmagazine.com/tutorials/user- friendly-custom-fields-meta-boxes-wordpress Or if youre not into coding http://wordpress.org/extend/plugins/more-fields/
  • 25. Its got a widget Typically in a sidebar Can be anywhere in a theme Widget areas Many plugins provide widgets Rapid prototyping of information architecture
  • 26. A widget it has got Widget areas on interconnecti t.com make up the home page and footer section Page widget (+ jQuery) Text Widget Posts widgets Authors widget Archive widget Further reading: http://codex.wordpress.org/Widgets_A PI
  • 27. Making sidebars register_sidebar( $args ); Can be done programmatically Widget area per category, per page etc... Could even use a custom menu walker to show widgets in a menu mega menus! Further Reading: http://justintadlock.com/archives/2010/11/08/sidebars-in-wordpress
  • 28. Post formats Differentiate content within a post type Think tumblr without the threat of tumbeasts Portable between themes Custom layouts for posts
  • 29. Post formats Supported formats: Aside, Gallery, Link, Image, Quote, Status, Video, Audio, Chat add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); Per post type: add_post_type_support( $post_type, 'post-formats' ); In the loop: has_post_format( $format );
  • 30. There can be only one
  • 33. In summary Menus take the pain out of site navigation Post types make WP suitable for many applications Widgets make it easy to refine information architecture Post formats are frickin cool
  • 34. And its goodnight from him Thanks for listening Robert ORourke http://sanchothefat.com @sanchothefat

Editor's Notes

  • #2: Hellos! Welcome to the presentation I will going over some of the recent advances in the WordPress core that make it much more powerful as a cms
  • #3: Why would you want to content manage everything? Youve got better things to do...
  • #4: While I wont be going into a huge amount of detail here I hop eto rpvide you with an overview iof what can be done. Well be covering Menus, Post types, Widgets and Post formats
  • #5: Lists of links are the bread & nutter of the web. Theyre everywhere. - In the past whenusing wordpress as a cms it was an all/nothing approach to do it programmatically - Hands up whos hand coded a menu? - Lists of links can be really simple - They can be more complex like an archive - Or super massive like on a news site
  • #6: Changing URLs when moving from local to dev & back again, it just works - CSS Hooks will see a short example - Theme Locations place created menus within a theme Menu widget to put links anywhere
  • #7: The menu admin is tied into the theme being used so youll find it in the Appearance dropdown - Create a menu by typing the name in the box and clicking create - So far so good -
  • #8: The menu admin is tied into the theme being used so youll find it in the Appearance dropdown Create a menu by typing the name in the box and clicking create So far so good
  • #9: Adding links is easy Boxes provide a way of adding arbritrary links and also link within the site Check the boxes and add to menu
  • #10: Drag & Drop Dont forget to save changes
  • #11: Drag & Drop Indent to make submenus Dont forget to save changes
  • #12: Screen options! Easy to miss hiding up there in the corner - Use it to show more fields than normal in the link edit box - Use it to show selection boxes on left Links to post types and taxonomies -
  • #13: Theme locations are where the magic happens - They let you direct menus youve created to sections of the site - The code is literally that simple, although there are plenty more options, filters & hooks available -
  • #14: Recommend googling the top line and youll find good tutorials - Useful to know exactly what is possible Image below shows a menu with a custom walker. - Featured images from posts are shown at a custom image size. Use the object_type property - Categories have a bit of extra magic to enable images wordpress.stackexchange.com - Could even go so far as to show a widget areas for the menu items! Slightly mad but sometimes you need a mega menu
  • #15: Post types should really be called content types - Within wordpress posts and pages are the default post types You can use the functions wp uses itself to add more post types
  • #16: Post types allow you to separate your content especially when its specific to what the theme or plugin needs to do. - Forums via bbPress plugin forums, topic & replies are all post types - Properties a theme or plugin that provides a way to list properties on a website - Static blocks Appthemes -
  • #17: Labels is an array of labels too much to show here - Show ui shows it in the admin menu Show in menu Show post type on menus screen -
  • #18: Definitely the quickest way to create the code you need - Use output in your themes functions.php or in your plugin.
  • #19: Basically the same as posts/pages admin - You can edit the table columns and filter section at the top but its fairly complicated wp.stackexchange
  • #20: Blobs plugin adds a simple way to create rich content boxes that can be called in the theme via shortcodes, widget or template tag - User friendly custom fields - Example: 404 page message, no results found message, static rich text in a sidebar
  • #21: So called because of how the database works - Posts table provides underlying structure - Posts can be extended with post meta -
  • #22: Abstraction layer on top of the custom fields box Custom fields not the most user friendly thing to rely on for clients Use metaboxes Codex is a great resource
  • #23: Google this stuff because theres lots of good tuts out there - Plugins are an alternative
  • #24: Admin page has custom boxes for flickr gallery, user, set etc... And the id of said gallery, user or set
  • #25: Theme integrated with gravity forms - Metaboxes for tracking codes, extra content spaces, page layouts, gravity forms integration
  • #26: Widgets are an incredibly useful tool in WordPress for building up structure and IA - Lots of plugin have them like gravity forms, our weather widget, the blobs plugin, menus - Things that are the same across multiple pages but that need to be editable at a moments notice ideally by the client/site owner
  • #27: Lots of types of widgets Easy to build them just follow the example and youre away. Default widgets in default-widgets file of wp-includes
  • #28: The sky is the limit You can create sidebars in your init function based on existing pages/categories even menu items to make your sites hugely dynamic and flexible.
  • #29: A special taxonomy with an interface that only allows you to set one option - Previously used categories eg. gallery but gets messy quickly. Also clients may accidentally place something in two cats that have custom layouts. - Was typing in tumbeasts it tried to auto-correct to FU-beasts
  • #30: A special taxonomy with an interface that only allows you to set one option - Previously used categories eg. gallery but gets messy quickly. Also clients may accidentally place something in two cats that have custom layouts.
  • #31: Latest 2010 theme post formats
  • #32: Latest version of twenty theme displays gallery posts like this in a list.
  • #33: Auld by woothemes Wumblr by themify Shelf by thethemefoundry
  • #34: Menus Post types Widgets Formats
  • #35: Thanks for listening Any Questions?