This edition first published 2012
2012 John Wiley & Sons, Ltd.
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services, and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs, and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, except as permitted by the UK Copyright, Designs, and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks, or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley and Sons, Inc. and/ or its affiliates in the United States and/or other countries, and may not be used without written permission. WordPress is a registered trademark of Automattic, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in the book.
A catalogue record for this book is available from the British Library.
ISBN 978-1-119-94271-9 (paperback); ISBN 978-1-119-94366-2 (epdf);
978-1-119-94368-6 (emobi); 978-1-119-94367-9 (epub)
Set in 10/12 Minion Pro Regular by Indianapolis Composition Services
Printed in U.S. by CJK
Dedication
Who do you dedicate a book on WordPress development to? Your parents? Your pets? Your lovers? Your slightly mentally deficient alter ego who wears tights and that weird interpretation of the WordPress W ?
None of the above. What do they know about this stuff anyway? Except that weird W guy, of course. Hes a genius, in his own sense.
Id like to dedicate this book to the WordPress community, the core team, and all developers out there who are contributing to the ecosystem with themes, plugins, and blog and forum posts. Youre all doing something to keep this platform of ours yes, ours propelling forward, and this is important. What were part of here isnt just some web publishing platform thingy to help the major corporations save money. It isnt about creating new blogs, sites, or startups on a budget. Its not even about the accessibility of modern web technology.
This is about being able to express yourself and giving your fellow man the same opportunity. WordPress and open source are as much about free speech and power to the people as anything else. This is what keeps me going, keeps me invested, and keeps me interested in this platform.
So there. This book is dedicated to the possibilities a platform such as WordPress offers for everybody. Use it; speak your mind; make a difference. And have fun while youre at it!
Thord Daniel Hedengren
Publishers Acknowledgments
Some of the people who helped bring this book to market include the following:
Editorial and Production
VP Consumer and Technology Publishing Director: Michelle Leete
Associate DirectorBook Content Management: Martin Tribe
Associate Publisher: Chris Webb
Assistant Editor: Ellie Scott
Development Editor: Dana Lesh
Copy Editor: Dana Lesh
Technical Editor: Justin Tadlock
Editorial Manager: Jodi Jensen
Senior Project Editor: Sara Shlaer
Editorial Assistant: Leslie Saxman
Marketing
Associate Marketing Director: Louise Breinholt
Senior Marketing Executive: Kate Parrett
Composition Services
Compositor: Indianapolis Composition Services
Proofreader: Susan Hobbs
Indexer: Potomac Indexing, LLC
About the Author
Thord Daniel Hedengren is addicted to words, which led him to launch his first online newsletter in 1996. It all went downhill from there, with dozens of sites and a career as an editor and freelancer in Sweden and abroad.
Going international all started with a blog post, which led to a book deal with Wiley, which in turn resulted in the Smashing WordPress: Beyond the Blog book and its follow-up Smashing WordPress Themes: Making WordPress Beautiful, and an even stronger voice in the WordPress community. Youre holding the third edition of the critically acclaimed Smashing WordPress: Beyond the Blog in your hands right now. This is really just the beginning because that word obsession keeps Thord spewing out new stuff.
When not obsessed with words, Thord and friends are building cool websites using WordPress at his web design firm Odd Alice. He also edits magazines and writes freelance articles for both print and web publications, in both Swedish and English. You can follow everything Thord on http://tdh.me.
Thord lives in the land of kings, Sweden.
Introduction
Writing a book about WordPress isnt the easiest endeavor that you could tackle. When my editor and I first started discussing this project, the idea was to create something that not only acts as an introduction to web developers and professionals who want to utilize the power of the WordPress platform, but also sparks the minds to create things beyond the obvious.
Or go beyond the blog, as it were, which is also the subtitle of this book. That subtitle still stands, as this book reaches its third edition.
The whole point is really to prove that WordPress is so much more than a blog-publishing platform. You can build just about anything with it, and you should as well if you like fast deployments and great flexibility. It is not always the perfect choice, but it should definitely be considered at all times. The ease with which you can both build and use this platform is a selling point, just as is the living community that can back you up when you run into problems and the fact that this is open source at its finest.
Although I think that anyone with some knowledge of HTML, CSS, and PHP can learn WordPress from this book, it is important to remember that this is not a beginners book. I start at a pretty high pace to make sure that even professionals get the fundamentals right. It is so easy to stick to familiar territory and do things the way theyve always been done, instead of learning to do them right. And although having the basics in here will help anyone get started with WordPress, you really should know some HTML and CSS and have at least a grasp of what PHP is and does. If those are alien concepts to you, I urge you to read up on them first.