Digging-into-WordPress_3.4.pdf

(34564 KB) Pobierz
Acknowledgements
• Thank you to Thane Champie and James Starr for their help with proofreading.
• Thanks also to the many readers who have helped with further improvements.
• Thank you to everyone who allowed screenshots to be printed in this book.
• Thank you to the incredible WordPress community for making WordPress #1.
• And most of all, thanks to you, the reader, for sharing this adventure with us.
Chris would like to thank
• My mom for all the excellent printing advice (and for being a good mom).
• Jeff Penman for insisting the book was a good idea.
• Tim Chatman for giving me the time and assistance I needed to get it finished.
Jeff would like to thank
• My wife, Jennifer, for her loving support and encouragement.
• My two children, Josh and Lorelei, for being so awesome.
• Friends, family, and everyone who helps along the way.
DIGGING INTO WORDPRESS
By Chris Coyier and Jeff Starr
Version 3.4 • October 1st, 2012
© 2012 Digging into WordPress
Visit us online @ DigWP.com
D I G G I N G
I N T O
C H R I S
C O Y I E R
&
J E F F
S T A R R
Short URLs
The URLs in this book are so called “short URLs.”
They look like this:
http://digwp.com/u/1
– When you
click on one (PDF people) or enter one into a browser
(Book people), you will be instantly redirected to the
URL we are trying to get you to. What’s up with that?
Are we trying to drive traffic to our own site? Nope,
we are trying to do two things:
1)
Make it easier for you
(you don’t need to
type in long awkward URLs)
2)
Make it easy for us
(it is easier to
typeset and design around short
URLs than long ones)
3.4.2
That is the current version of WordPress at
the time this book was published. So if we say
something like “...the current version of WordPress,”
we are talking about 3.4.2. If we need to mention an
older version, we’ll be specific about that.
So what if you are reading this and 3.5 is already out?
Don’t worry about it!
The information in here will
still be valid. WordPress does a good job about not
breaking existing stuff for new versions.
But there will be changes, and we intend to
keep this book updated with those new
things. All current owners of this
book will get free PDF updates
as it is updated!
See that? That’s dog food. It’s a metaphor.
We, the authors of Digging Into WordPress, eat our own dog food. We aren’t just here to
stand on a pedestal and preach about how you should do things. We practice these things
in the sites we work on every day.
Much of what you will read in this book is put into practice on the WordPress blog that
accompanies this book.
http://digwp.com
Contents
1
Welcome to WordPress
1.1.1 Welcome
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.1.2 Why WordPress is Amazing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.1.3. How to Set up and Configure WordPress
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
1.1.4 How to Implement Advanced Functionality
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
1.1.5 How to Optimize and Secure WordPress
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
1.1.6 How to Maintain Your WordPress Site
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
1.1.7 Don’t Worry
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
1.2.1 So, You’ve Never Heard of WordPress
. . . . . . . . . . . . . . . . . . . . . . .
12
1.2.2 One Template, Many Pages
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
1.2.3 Powerful, Flexible and Extensible
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
1.3.1 Key Components of a WordPress Site
. . . . . . . . . . . . . . . . . . . . . . .
15
1.3.2 WordPress Core Files
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
1.3.3 The WordPress Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
1.3.4 The Back End
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
1.3.5 The Front End
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
1
Zgłoś jeśli naruszono regulamin