Tải bản đầy đủ

930 wordpress all in one for dummies

g Easier!
Making Everythin



s
s
e
r
P
Word

®

N E
A L L- I N - O

81
BOOKS
IN


• WordPress Basics
• Setting Up the WordPress Software
• Exploring the WordPress Dashboard
• Publishing Your Site with WordPress
• Examining SEO and Social Media
• Customizing the Look of Your Site
• Using and Developing Plugins
• Running Multiple Sites with WordPress

Lisa Sabin-Wilson, Cory Miller,
Kevin Palmer, Andrea Rennick,
and Michael Torbert
www.it-ebooks.info


Get More and Do More at Dummies.com ®
Start with FREE Cheat Sheets
Cheat Sheets include
• Checklists
• Charts
• Common Instructions
• And Other Good Stuff!

To access the Cheat Sheet created specifically for this book, go to

www.dummies.com/cheatsheet/wordpressaio

Get Smart at Dummies.com
Dummies.com makes your life easier with 1,000s
of answers on everything from removing wallpaper
to using the latest version of Windows.
Check out our
• Videos
• Illustrated Articles
• Step-by-Step Instructions
Plus, each month you can win valuable prizes by entering
our Dummies.com sweepstakes. *
Want a weekly dose of Dummies? Sign up for Newsletters on
• Digital Photography
• Microsoft Windows & Office


• Personal Finance & Investing
• Health & Wellness
• Computing, iPods & Cell Phones
• eBay
• Internet
• Food, Home & Garden

Find out “HOW” at Dummies.com
*Sweepstakes not currently available in all countries; visit Dummies.com for official rules.

www.it-ebooks.info


WordPress®
ALL-IN-ONE

FOR

DUMmIES



www.it-ebooks.info


www.it-ebooks.info


WordPress®
ALL-IN-ONE

FOR

DUMmIES



by Lisa Sabin-Wilson, Cory Miller, Kevin Palmer,
Andrea Rennick, and Michael Torbert

www.it-ebooks.info


WordPress® All-in-One For Dummies®
Published by
Wiley Publishing, Inc.
111 River Street
Hoboken, NJ 07030-5774
www.wiley.com
Copyright © 2011 by Wiley Publishing, Inc., Indianapolis, Indiana
Published by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
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, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the
Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.
Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley
& Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://
www.wiley.com/go/permissions.
Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the
Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, Making Everything
Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/
or its affiliates in the United States and 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. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this
book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO
REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF
THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE
CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES
CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE
UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR
OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF
A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE
AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE
OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES
THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT
MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS
WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND
WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care
Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.
For technical support, please visit www.wiley.com/techsupport.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may
not be available in electronic books.
Library of Congress Control Number: 2011924142
ISBN: 978-0-470-87701-2
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1

www.it-ebooks.info


About the Authors
Lisa Sabin-Wilson (WordPress For Dummies, BuddyPress For Dummies,
WordPress Web Design For Dummies) has 8 years experience working with
the WordPress platform, having adopted it early in its first year of release in
2003. Lisa is the owner of a successful design studio, E.Webscapes (http://
ewebscapes.com), and a WordPress Web hosting company, BlogsAbout
(http://blogsabout.com), and is a regular speaker on topics related to
design and WordPress at several national conferences. Additionally, she
hosts WordPress workshops around the country, teaching people how to use
the WordPress platform to publish their own sites on the World Wide Web.
You can find Lisa online at her personal blog (http://lisasabin-wilson.
com) and Twitter (@LisaSabinWilson).
Cory Miller is a former newspaper journalist and public relations practitioner, turned freelance web designer, turned full-time entrepreneur. In
January 2008, Cory founded iThemes (http://ithemes.com), a provider
of premium WordPress themes, and in the summer of 2009, he and his team
launched WebDesign.com (http://webdesign.com), a premium provider
of web design training with WordPress. You can find Cory online on his personal blog: http://corymiller.com and on Twitter: @CoryMiller303.
Kevin Palmer is the founder of Social Media Answers, a consulting firm
that helps companies create and foster a social media marketing strategy,
improve their SEO, and drive traffic through organic and paid marketing in
the B2B and B2C spaces. Kevin has successfully helped Internet startups and
Fortune 500 companies. Kevin resides in Portland, OR and is attempting to
prove you are never too old to play ice hockey. You can read Kevin’s blog
at http://socialmediaanswers.com/blog and follow him on Twitter
(@kevinpalmer).
Andrea Rennick is self-taught in all things WordPress since 2005. She is
also a mom of four homeschooled, mostly grown children, and grandmother
to one. She thinks if she can do it, you can, too. When not building things
with WordPress or writing about how to do things with WordPress, she’s
usually quilting. Often, Andrea populates the WordPress support forums
with answers to your questions about WordPress, particularly her area of
expertise: WordPress Multisite. She also runs a multisite resource Web site,
WordPress Must Use Tutorials, at http://wpmututorials.com. You can
find Andrea online at her personal blog (http://ronandandrea.com) and
Twitter (@Andrea_R).
Michael Torbert is the developer of the popular WordPress All in One SEO
Pack plugin and owner of Semper Fi Web Design (http://semperfiweb
design.com). Michael’s expertise includes WordPress plugin development
and best SEO practices.

www.it-ebooks.info


Dedication
Lisa Sabin-Wilson: To WordPress . . . and all that entails from the developers,
designers, forum helpers, bug testers, educators, consultants, plugin makers,
and theme bakers.
Cory Miller: I would like to dedicate my part of the book to my family — my
mom, Charleen, and my dad, David, who loved and supported me and simply
encouraged me that I could do anything I set my mind to do, and my grandfather and fellow entrepreneur, Leo Chaney, who inspired me to live my
dreams and to use business as a tool to provide a great, fulfilling life for my
family and team.
Kevin Palmer: For my parents, Alex and Sue Guerra, who tend to have no
idea what I’m doing, but who morally support me anyway.
Andrea Rennick: I would like to dedicate my portion of this book to my
grandfather, Alfred Thomas Thornton, who introduced me to this new thing
called a computer. My only wish is that you and Nanny could hold this book
in your hands.

www.it-ebooks.info


Authors’ Acknowledgments
Lisa Sabin: Every person involved in the WordPress community plays a vital
role in making this whole thing work, and work well. Kudos to all of you! Also,
big thanks to my wonderful husband, Chris Wilson, for his incredible support, backbone, and ability to put up with my crazy days of writing — I could
not have done it without you!
Cory Miller: I would not be involved in this project without the help and support of my amazing team at iThemes, and in particular Chris Jean and Matt
Danner — it is an honor to work with you all and I count you as some of my
best friends in life! Big thanks to my business partners, Scott Day and Jay
Chapman, for simply being who you are — amazing and encouraging every
step of the way. Last but certainly not least, I want to thank Lisa Sabin-Wilson
— your personal friendship and support has meant more to me than you
might ever realize. I cherish your presence in my life and thank you for inviting me to be part of this project. To all the above: #boom.
Kevin Palmer: I would like to thank Lisa Sabin-Wilson for inviting me to
contribute to this book and for answering numerous WordPress questions
throughout the years. I would also like to thank my friends: Michelle, Kelly,
Chrissy, Mark, Kurt, Kris, Tiffany, Nina, Tim, Chris, Lorna, Shawn, Karl, Tom,
and numerous others who have listened, given advice, and helped me down
my path.
Andrea Rennick: None of this would have been possible if Lisa hadn’t asked
me to write my section on the multisite feature, so a huge thanks to her for
making that call. Thanks to the editors for making me look good, and my
fellow co-authors for being awesome. It was great to have someone to commiserate with. A lot of my knowledge comes from the great folks who shared
what they knew, via both the old WordPress MU forums and blogs. Some of
the people are drmike, lunabyte, David Sader, Deanna Schneider, Tim Moore,
SteveAtty, MrBrian, venturemaker, suleiman, Jim Groom and probably many
others. Also, WordPress people like Matt Mullenweg, Donncha O’Caoimh,
Jane Wells, Pete Mall, John James Jacoby, Boone Gorges, Andy Peatling, and
more. Everyone is so wonderful at embracing new faces; big hugs all around
at the next WordCamp. Thanks to my mom, who always knew I could do
something like this; Addison and Sarah for not minding too much when their
mom does something cool; Meaghan for reminding me to eat; and Emma for
reminding me to play. And, finally, my husband Ron for being there to talk me
down, to read over my work, to put up with me, to bounce ideas off of, and
to be in this together. I love you so much — here’s to another twenty years.
I would be remiss if I didn’t mention how much Ron has also brought to my
knowledge base and how much work he has done within the multisite area.
Michael Torbert: Thanks go out to the WordPress community.

www.it-ebooks.info


Publisher’s Acknowledgments
We’re proud of this book; please send us your comments at http://dummies.custhelp.com.
For other comments, please contact our Customer Care Department within the U.S. at 877-762-2974,
outside the U.S. at 317-572-3993, or fax 317-572-4002.
Some of the people who helped bring this book to market include the following:
Acquisitions, Editorial

Composition Services

Sr. Project Editor: Christopher Morris

Project Coordinator: Katie Crocker

Acquisitions Editor: Amy Fandrei

Layout and Graphics: SDJumper,
Corrie Socolovitch

Copy Editors: Brian Walls, Jennifer Riggs, and
Laura Miller
Technical Editors: Paul Chaney, Tom Myers

Proofreaders: Melissa Cossell,
Bonnie Mikkelson

Editorial Manager: Kevin Kirschner

Indexer: BIM Indexing & Proofreading Services

Editorial Assistant: Amanda Graham
Sr. Editorial Assistant: Cherie Case
Cartoons: Rich Tennant
(www.the5thwave.com)

Publishing and Editorial for Technology Dummies
Richard Swadley, Vice President and Executive Group Publisher
Andy Cummings, Vice President and Publisher
Mary Bednarek, Executive Acquisitions Director
Mary C. Corder, Editorial Director
Publishing for Consumer Dummies
Diane Graves Steele, Vice President and Publisher
Composition Services
Debbie Stailey, Director of Composition Services

www.it-ebooks.info


Contents at a Glance
Introduction ................................................................ 1
Book I: WordPress Basics ............................................. 9
Chapter 1: Exploring Basic WordPress Concepts........................................................ 11
Chapter 2: Exploring the World of Open Source Software ......................................... 23
Chapter 3: Understanding Development and Release Cycles .................................... 33
Chapter 4: Introducing the WordPress Community .................................................... 41
Chapter 5: Discovering Different Versions of WordPress .......................................... 53

Book II: Setting Up the WordPress Software ................ 65
Chapter 1: Understanding the System Requirements ................................................. 67
Chapter 2: Using File Transfer Protocol........................................................................ 77
Chapter 3: Introducing PHP and MySQL ....................................................................... 89
Chapter 4: Installing WordPress on Your Web Server ................................................ 99
Chapter 5: Configurations for Optimum Performance and Security ............................115
Chapter 6: Upgrading WordPress ................................................................................ 141
Chapter 7: Backing Up, Packing Up, and Moving to a New Host ............................. 151

Book III: Exploring the WordPress Dashboard ............. 167
Chapter 1: Logging In and Taking a Look Around ..................................................... 169
Chapter 2: Customizing Your Dashboard ................................................................... 183
Chapter 3: Exploring Tools and Settings .................................................................... 191
Chapter 4: Managing Users and Multiple Authors..................................................... 223
Chapter 5: Dealing with Comments and Spam ........................................................... 233
Chapter 6: Building Link Lists ...................................................................................... 247
Chapter 7: Creating Categories and Tags ................................................................... 257

Book IV: Publishing Your Site with WordPress............ 269
Chapter 1: Writing Your First Post .............................................................................. 271
Chapter 2: Examining the Difference between Posts and Pages .............................. 287
Chapter 3: Uploading and Displaying Photos and Galleries ..................................... 297
Chapter 4: Exploring Podcasting and Video Blogging............................................... 309
Chapter 5: Working with Custom Fields ..................................................................... 319
Chapter 6: Using WordPress as a Content Management System............................. 333

www.it-ebooks.info


Book V: Examining SEO and Social Media .................. 357
Chapter 1: Exposing Your Content .............................................................................. 359
Chapter 2: Creating a Social-Media Listening Hub .................................................... 381
Chapter 3: Understanding Analytics ........................................................................... 403
Chapter 4: Search Engine Optimization ...................................................................... 421
Chapter 5: Exploring Popular SEO Plugins ................................................................. 437

Book VI: Customizing the Look of Your Site ................ 447
Chapter 1: Examining the Default Theme: Twenty Ten ............................................ 449
Chapter 2: Finding and Installing WordPress Themes .............................................. 471
Chapter 3: Exploring the Anatomy of a Theme .......................................................... 485
Chapter 4: Customizing Your Theme .......................................................................... 517
Chapter 5: Understanding Parent and Child Themes ............................................... 537
Chapter 6: Digging into Advanced Theme Development .......................................... 555
Chapter 7: Using Theme Frameworks to Simplify Customization ........................... 601

Book VII: Using and Developing Plugins .................... 613
Chapter 1: Introducing WordPress Plugins ................................................................ 615
Chapter 2: Installing and Activating Plugins .............................................................. 633
Chapter 3: Exploring Plugin Options and Settings .................................................... 647
Chapter 4: Modifying Existing Plugin Code to Your Liking....................................... 663
Chapter 5: Creating Simple WordPress Plugins from Scratch ................................. 681
Chapter 6: Exploring Plugin Development Best Practices ........................................ 731
Chapter 7: Plugin Tips and Tricks ............................................................................... 741

Book VIII: Running Multiple Sites with WordPress ..... 759
Chapter 1: An Introduction to Multiple Sites ............................................................. 761
Chapter 2: Setting Up and Configuring Network Features ........................................ 771
Chapter 3: Becoming a Network Admin ...................................................................... 779
Chapter 4: Management of Users and Access Control .............................................. 799
Chapter 5: Using Network Plugins and Themes ......................................................... 809
Chapter 6: Using Multiple Domains within Your Network........................................ 825

Index ...................................................................... 841

www.it-ebooks.info


Table of Contents
Introduction ................................................................. 1
About This Book .............................................................................................. 1
Foolish Assumptions ....................................................................................... 1
Conventions Used in This Book ..................................................................... 2
What You Don’t Have to Read........................................................................ 2
How This Book Is Organized .......................................................................... 3
Book I: WordPress Basics ..................................................................... 3
Book II: Setting Up the WordPress Software ...................................... 3
Book III: Exploring the WordPress Dashboard................................... 4
Book IV: Publishing Your Site with WordPress.................................. 4
Book V: Examining SEO and Social Media .......................................... 5
Book VI: Customizing the Look of Your Site ....................................... 5
Book VII: Using and Developing Plugins ............................................. 6
Book VIII: Running Multiple Sites with WordPress ............................ 7
Icons Used in This Book ................................................................................. 7
Where to Go from Here ................................................................................... 8

Book I: WordPress Basics .............................................. 9
Chapter 1: Exploring Basic WordPress Concepts . . . . . . . . . . . . . . . . .11
Introducing the World of Blogging .............................................................. 12
Understanding Blogging Technologies ....................................................... 13
Archiving your publishing history..................................................... 14
Interacting with your readers through comments .......................... 15
Feeding your readers........................................................................... 16
Tracking back ....................................................................................... 18
Dealing with comment and trackback spam .................................... 18
Using WordPress as a Content Management System ............................... 19

Chapter 2: Exploring the World of Open Source Software. . . . . . . . . .23
Defining Open Source.................................................................................... 24
Understanding WordPress Licensing.......................................................... 27
Applying WordPress Licensing to Your Projects ...................................... 28

Chapter 3: Understanding Development and Release Cycles . . . . . . .33
Discovering WordPress Release Cycles ..................................................... 33
Upgrading your WordPress experience ............................................ 34
Understanding the cycles of a release .............................................. 35
Finding WordPress release archives ................................................. 36
Keeping Track of WordPress Development ............................................... 37
Downloading Nightly Builds ......................................................................... 39

www.it-ebooks.info


xii

WordPress All-in-One For Dummies
Chapter 4: Introducing the WordPress Community . . . . . . . . . . . . . . . .41
Finding Other WordPress Users .................................................................. 42
Finding WordPress news and tips on community Web sites ......... 42
Locating users on social networks .................................................... 42
Users Helping Users ...................................................................................... 43
WordPress support forums ................................................................ 43
WordPress user manual ...................................................................... 44
WordPress mailing lists ...................................................................... 45
Discovering Professional WordPress Consultants and Services............. 45
WordPress designers .......................................................................... 47
Developers ............................................................................................ 48
Consultants ........................................................................................... 49
Contributing to WordPress .......................................................................... 50
Participating in Live WordPress Events ..................................................... 51

Chapter 5: Discovering Different Versions of WordPress . . . . . . . . . .53
Comparing the Two Versions of WordPress .............................................. 53
Choosing the hosted version from WordPress.com ....................... 55
Self-hosting with WordPress.org........................................................ 57
Hosting Multiple Sites with One WordPress Installation ......................... 60
Discovering WordPress VIP Services .......................................................... 62

Book II: Setting Up the WordPress Software ................. 65
Chapter 1: Understanding the System Requirements . . . . . . . . . . . . . .67
Establishing Your Domain ............................................................................ 67
Understanding domain name extensions ......................................... 68
Considering the cost of a domain name ........................................... 68
Registering your domain name .......................................................... 69
Finding a Home for Your Blog ...................................................................... 70
Getting help with hosting WordPress ............................................... 72
Dealing with disk space and bandwidth ........................................... 72

Chapter 2: Using File Transfer Protocol . . . . . . . . . . . . . . . . . . . . . . . . . .77
Introducing FTP Concepts ............................................................................ 77
Setting Up FTP on Your Hosting Account .................................................. 78
Finding and Using Free and Easy FTP Programs ....................................... 81
Connecting to the Web Server via FTP ............................................. 81
Transferring files from point A to point B ........................................ 85
Editing files by using FTP .................................................................... 85
Changing file permissions ................................................................... 86

www.it-ebooks.info


Table of Contents
Chapter 3: Introducing PHP and MySQL. . . . . . . . . . . . . . . . . . . . . . . . . .89
Understanding How PHP and MySQL Work Together .............................. 89
Exploring PHP Basics .................................................................................... 90
Trying Out a Little PHP ................................................................................. 92
Managing Your MySQL Database ................................................................ 94

Chapter 4: Installing WordPress on Your Web Server . . . . . . . . . . . . .99
Installing the WordPress Files ..................................................................... 99
Using Fantastico to install WordPress ............................................ 100
Installing WordPress manually ........................................................ 104

Chapter 5: Configurations for Optimum Performance and Security . . .115
Discovering the Configuration File ............................................................ 116
Securing the configuration file ......................................................... 116
Exploring main configuration settings ............................................ 117
Moving the /wp-content directory ................................................... 122
Tweaking the configuration file for optimization........................... 123
Using a Caching System for Speed and Performance ............................. 126
Minifying JavaScript, CSS, and HTML .............................................. 126
Using a content delivery network .................................................... 128
Using plugins to make caching easier ............................................. 129
Editing Files and Testing Performance with WordPress Tools ............. 129
Choosing the text editor that’s right for you ................................. 130
Notepad (Windows)........................................................................... 131
Notepad++ (Windows)....................................................................... 132
TextMate (Mac) .................................................................................. 134
Understanding and choosing a Web browser ................................ 134
Discovering different browsers and tools ...................................... 134
Understanding cross-browser compatibility ................................. 139

Chapter 6: Upgrading WordPress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
Getting Notified of an Available Upgrade ................................................. 141
Backing Up Your Database ......................................................................... 144
Upgrading WordPress Automatically........................................................ 145
Upgrading WordPress Manually ................................................................ 147

Chapter 7: Backing Up, Packing Up, and Moving to a New Host . . .151
Migrating Your Existing Blog to WordPress............................................. 151
Movin’ on up ....................................................................................... 152
Preparing for the big move ............................................................... 153
Converting templates ........................................................................ 154
Moving your blog to WordPress ...................................................... 155
Importing from Blogspot, er Blogger............................................... 156
Importing from LiveJournal .............................................................. 157
Importing from Movable Type and TypePad ................................. 159
Importing from WordPress ............................................................... 160
Importing from an RSS feed .............................................................. 161
Finding other import resources ....................................................... 163

www.it-ebooks.info

xiii


xiv

WordPress All-in-One For Dummies
Moving Your Web Site to a Different Host................................................ 163
Creating a backup and moving manually........................................ 163
Using a plugin to back up and move to a new host ....................... 165

Book III: Exploring the WordPress Dashboard ............. 167
Chapter 1: Logging In and Taking a Look Around. . . . . . . . . . . . . . . . .169
Logging In to the Dashboard ...................................................................... 169
Navigating the Dashboard .......................................................................... 170
Right Now............................................................................................ 172
Recent Comments .............................................................................. 175
Incoming Links ................................................................................... 176
Plugins ................................................................................................. 177
QuickPress .......................................................................................... 178
Recent Drafts ...................................................................................... 179
WordPress Blog.................................................................................. 179
Other WordPress News ..................................................................... 181

Chapter 2: Customizing Your Dashboard . . . . . . . . . . . . . . . . . . . . . . . .183
Arranging the Dashboard to Your Tastes ................................................ 183
Removing Dashboard Modules ........................................................ 185
Changing the Dashboard layout ...................................................... 185
Finding Inline Documentation and Help ................................................... 187
Creating Your Own Workspace ................................................................. 188

Chapter 3: Exploring Tools and Settings . . . . . . . . . . . . . . . . . . . . . . . .191
Configuring the Settings.............................................................................. 191
General ................................................................................................ 192
Writing ................................................................................................. 196
Reading................................................................................................ 198
Discussion ........................................................................................... 200
Media ................................................................................................... 206
Privacy................................................................................................. 208
Permalinks .......................................................................................... 209
Creating Your Personal Profile .................................................................. 214
Setting Your Blog’s Format......................................................................... 217
Posts .................................................................................................... 217
Media ................................................................................................... 217
Links .................................................................................................... 218
Pages.................................................................................................... 218
Comments ........................................................................................... 219
Appearance ......................................................................................... 219
Plugins ................................................................................................. 220
Users .................................................................................................... 221
Tools .................................................................................................... 221

www.it-ebooks.info


Table of Contents
Chapter 4: Managing Users and Multiple Authors. . . . . . . . . . . . . . . .223
Understanding User Roles and Capabilities ............................................. 223
Allowing New User Registration ................................................................ 225
Adding New Users ....................................................................................... 226
Editing User Details ..................................................................................... 228
Managing a Multi-Author Site ..................................................................... 229
Tools that help authors communicate ............................................ 230
Tools to promote author profiles .................................................... 231
Tools to manage multi-author blog posts....................................... 232

Chapter 5: Dealing with Comments and Spam . . . . . . . . . . . . . . . . . . .233
Deciding to Allow Comments on Your Site .............................................. 233
Positive aspects of allowing comments .......................................... 233
Exploring reasons to disallow comments ....................................... 234
Interacting with Readers through Comments.......................................... 235
Tracking back ..................................................................................... 236
Comment and trackback display ..................................................... 236
Managing Comments and Trackbacks ...................................................... 238
Dealing with Comment and Trackback Spam .......................................... 240
Tackling Spam with Akismet ...................................................................... 241

Chapter 6: Building Link Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247
Organizing Your Links................................................................................. 247
Adding new links ................................................................................ 249
Editing existing links.......................................................................... 254
Displaying Link Lists on Your Site ............................................................. 254

Chapter 7: Creating Categories and Tags . . . . . . . . . . . . . . . . . . . . . . .257
Archiving Content with WordPress........................................................... 257
Building categories ............................................................................ 260
Changing the name of a category .................................................... 261
Creating new categories.................................................................... 263
Creating and Editing Tags .......................................................................... 265

Book IV: Publishing Your Site with WordPress ............ 269
Chapter 1: Writing Your First Post. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
Composing Your Blog Post......................................................................... 271
Refining Your Post Options ........................................................................ 276
Publishing your post ......................................................................... 278
Being your own editor ....................................................................... 281
Creating Your Own Workspace for Writing.............................................. 282
Adjusting screen options .................................................................. 282
Arranging post modules.................................................................... 284

www.it-ebooks.info

xv


xvi

WordPress All-in-One For Dummies
Chapter 2: Examining the Difference between Posts and Pages . . .287
Understanding the Difference between Posts and Pages ....................... 287
Creating the Front Page of Your Web Site ................................................ 288
Creating the static page .................................................................... 290
Setting page options .......................................................................... 290
Assigning a static page as the front page ....................................... 292
Adding a Blog to Your Web Site................................................................. 294

Chapter 3: Uploading and Displaying Photos and Galleries . . . . . . .297
Inserting Images into Your Blog Posts ...................................................... 297
Adding an image from the Web ........................................................ 298
Adding an image from your computer ............................................ 299
Aligning your images ......................................................................... 302
Inserting a Photo Gallery ............................................................................ 303

Chapter 4: Exploring Podcasting and Video Blogging . . . . . . . . . . . .309
Inserting Video Files into Your Blog Posts ............................................... 309
Adding video from the Web .............................................................. 310
Adding video from your computer .................................................. 311
Inserting Audio Files into Your Blog Posts............................................... 312
Podcasting with WordPress ....................................................................... 313
Keeping Media Files Organized.................................................................. 315

Chapter 5: Working with Custom Fields. . . . . . . . . . . . . . . . . . . . . . . . .319
Understanding Custom Fields .................................................................... 319
Exploring the Custom Fields Interface ...................................................... 320
Adding Custom Fields to Your Template File .......................................... 323
Entering the code in the template file ............................................. 324
Getting WordPress to check for your Custom Field ...................... 326
Exploring Different Uses for Custom Fields ............................................. 328

Chapter 6: Using WordPress as a Content Management System . . .333
Creating Different Page Views Using WordPress Templates ................. 333
Uploading the template ..................................................................... 334
Assigning the template to a static page .......................................... 335
Creating a Template for Each Post Category ........................................... 337
Pulling in Content from a Single Category ................................................ 338
Finding the category ID number ...................................................... 339
Adding the tag ........................................................... 339
Using Sidebar Templates ............................................................................ 341
Custom Styles for Sticky, Category, and Tag Posts................................. 342
Working with Custom Post Types ............................................................. 344
Optimizing Your WordPress Blog.............................................................. 350
Planting keywords in your Web site ................................................ 351
Optimizing your post titles for search engine success ................. 352
Writing content with readers in mind ............................................. 353
Creating categories that attract search engines ............................ 354
Using the tag for images ....................................................... 354

www.it-ebooks.info


Table of Contents

Book V: Examining SEO and Social Media................... 357
Chapter 1: Exposing Your Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
Understanding the Three C’s of the Social Web ...................................... 359
Content ................................................................................................ 360
Communication .................................................................................. 362
Consistency ........................................................................................ 364
Making It Easy for Users to Share Your Content ..................................... 366
Determining Where You Need to Participate........................................... 370
Finding Influencers ...................................................................................... 372
Leveraging Twitter for Social-Media Success .......................................... 376
Building your Twitter account by using automated tools ............ 376
Updating Twitter from your WordPress blog................................. 378
Engaging with Facebook ............................................................................. 379

Chapter 2: Creating a Social-Media Listening Hub . . . . . . . . . . . . . . .381
Exploring Reasons for a Social-Media Listening Hub .............................. 382
Eavesdropping on yourself ............................................................... 382
Keeping tabs on your brand ............................................................. 382
Exploring Different Listening Tools........................................................... 383
Monitoring with Google Alerts ......................................................... 384
Tracking conversations with Social Mention ................................. 386
Listening to blogs with BlogPulse .................................................... 388
Checking rank with Technorati ........................................................ 388
Connecting conversations with BackType ..................................... 389
Searching communities with Boardreader ..................................... 389
Staying on top of conversations with Twitter Search ................... 390
Microblog searching with Twingly .................................................. 391
Creating Your Own Personal Monitoring Mix .......................................... 392
Grouping your monitoring results ................................................... 393
Cleaning and combining your feeds ................................................ 394
Editing the Dashboard to Create a Listening Post .................................. 400

Chapter 3: Understanding Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . .403
Understanding the Importance of Analytics ............................................ 403
Exploring the Options to Track Data ........................................................ 404
Understanding Key Analytics Terminology ............................................. 407
Signing Up and Installing Google Analytics on Your WordPress Site ... 409
Signing up for Google Analytics ....................................................... 410
Installing the tracking code .............................................................. 412
Verifying that you installed the code properly .............................. 414
Installing and configuring the Analytics plugin.............................. 414
Using the data from the plugin......................................................... 417
Using PostRank with WordPress ............................................................... 418

www.it-ebooks.info

xvii


xviii

WordPress All-in-One For Dummies
Chapter 4: Search Engine Optimization . . . . . . . . . . . . . . . . . . . . . . . . .421
Understanding the Importance of Search Engine Optimization ............ 421
Outlining the Advantages That WordPress Presents for SEO ............... 422
Understanding How Search Engines See Your Content.......................... 424
Using links as currency ..................................................................... 426
Submitting to search engines and directories ............................... 427
Optimizing Your Blog under the Hood ..................................................... 428
Metadata ............................................................................................. 428
Robots.txt ........................................................................................... 428
Researching Your Niche ............................................................................. 428
Creating Search Engine Strategies............................................................. 430
Setting up your blog .......................................................................... 430
Improving your blog’s design ........................................................... 431
Dealing with duplicate content ........................................................ 434
Creating an editorial SEO list/calendar ........................................... 434
Establishing a routine for publishing posts on your site.............. 434
Creating a link-building strategy ...................................................... 436

Chapter 5: Exploring Popular SEO Plugins . . . . . . . . . . . . . . . . . . . . . .437
Exploring Must-Use Plugins for SEO Best Practices................................ 437
All in One SEO Pack ..................................................................................... 438
XML Sitemap Generator for WordPress ................................................... 440
Redirection ................................................................................................... 442
Yoast Breadcrumbs ..................................................................................... 443
WP-Page Navi ............................................................................................... 443
Robots Meta ................................................................................................. 445

Book VI: Customizing the Look of Your Site ................ 447
Chapter 1: Examining the Default Theme: Twenty Ten . . . . . . . . . . . .449
Exploring the Layout and Structure .......................................................... 449
Customizing the Header Image .................................................................. 453
Customizing the Background Color .......................................................... 456
Including Custom Navigation Menus ........................................................ 459
Enhancing Your Web Site with Widgets ................................................... 462
Adding widgets to your sidebar or footer ...................................... 464
Using the Text widget ........................................................................ 466
Using the RSS widget ......................................................................... 467

Chapter 2: Finding and Installing WordPress Themes . . . . . . . . . . . .471
Getting Started with Free Themes ............................................................. 471
Understanding What to Avoid with Free Themes ................................... 473
Installing a Theme ....................................................................................... 475
Browsing the free themes ................................................................. 477
Previewing and activating a theme.................................................. 478
Exploring Premium Theme Options .......................................................... 480

www.it-ebooks.info


Table of Contents
Chapter 3: Exploring the Anatomy of a Theme . . . . . . . . . . . . . . . . . . .485
Starting with the Basics .............................................................................. 486
Understanding the Stylesheet .................................................................... 489
Exploring Template Tags, Values, and Parameters ................................ 490
Understanding the basics ................................................................. 491
Using parameters ............................................................................... 492
Customizing common tags ............................................................... 494
Digging deeper into the WordPress Codex..................................... 494
Creating New Widget Areas ........................................................................ 495
Registering your widget .................................................................... 495
Displaying new widgets on your site ............................................... 496
Simplifying customization with functions ...................................... 497
Exploring common problems ........................................................... 497
Examining the Main Index and The Loop ................................................. 498
Header template................................................................................. 500
Sidebar template ................................................................................ 505
Footer template .................................................................................. 506
Examining Other Template Files................................................................ 506
Customizing Your Blog Posts with Template Tags ................................. 507
Putting It All Together................................................................................. 508
Connecting the templates ................................................................. 508
Using additional stylesheets ............................................................ 515

Chapter 4: Customizing Your Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . .517
Changing Your Background Graphic ........................................................ 518
Uploading an image for background use ........................................ 520
Positioning, repeating, and attaching images ................................ 521
Changing Your Header Graphic ................................................................. 523
Considering the image dimensions ................................................. 525
Uploading a header image ................................................................ 525
Personalizing Your Theme with CSS ......................................................... 527
CSS selectors ...................................................................................... 529
CSS IDs and classes............................................................................ 530
CSS properties and values ................................................................ 531
Understanding Basic HTML Techniques .................................................. 532
Changing Basic Elements for a Unique Look............................................ 533
Background colors and images ........................................................ 533
Font family, color, and size ............................................................... 533
Borders................................................................................................ 535
Finding Additional Resources .................................................................... 536

Chapter 5: Understanding Parent and Child Themes. . . . . . . . . . . . . .537
Customizing Theme Style with Child Themes ......................................... 537
Creating a child theme ...................................................................... 538
Loading a parent theme’s style ........................................................ 540
Customizing the parent theme’s styling ......................................... 541
Using images in child theme designs .............................................. 543

www.it-ebooks.info

xix


xx

WordPress All-in-One For Dummies
Modifying Theme Structure with Child Themes...................................... 548
Overriding parent template files ...................................................... 549
Adding new template files................................................................. 549
Removing template files .................................................................... 552
Modifying the functions.php file ...................................................... 552
Preparing a Parent Theme.......................................................................... 553

Chapter 6: Digging into Advanced Theme Development . . . . . . . . . .555
Getting Started with Advanced Theming ................................................. 555
Finding a good starting point ........................................................... 556
Customizing the theme to your needs ............................................ 556
Adding New Template Files ........................................................................ 557
Creating named templates ................................................................ 557
Creating and using template parts .................................................. 559
Exploring content-specific standard templates ............................. 561
Using page templates ........................................................................ 563
Adding Theme Support for Built-In Features ........................................... 564
Adding support for custom menus .................................................. 565
Adding support for custom post types ........................................... 572
Adding Support for Custom Taxonomies ................................................. 583
Adding support for post formats ..................................................... 584
Adding support for post thumbnails ............................................... 592
Exploring Theme Options........................................................................... 595
Understanding theme options basics ............................................. 596
Building a simple theme options page ............................................ 596
Using theme options in the theme................................................... 600

Chapter 7: Using Theme Frameworks to Simplify Customization . . .601
Understanding Theme Frameworks .......................................................... 602
Discovering Popular Frameworks ............................................................. 602
Theme Hybrid..................................................................................... 602
Carrington ........................................................................................... 603
Thematic ............................................................................................. 604
Genesis ................................................................................................ 605
iThemes Builder ................................................................................. 606
Headway .............................................................................................. 607
Common Framework Features ................................................................... 608
Theme functions ................................................................................ 608
Hooks ................................................................................................... 609
Child themes....................................................................................... 610
Layout options ................................................................................... 610
Styling .................................................................................................. 610
Customizing Theme Frameworks .............................................................. 611

www.it-ebooks.info


Table of Contents

Book VII: Using and Developing Plugins..................... 613
Chapter 1: Introducing WordPress Plugins . . . . . . . . . . . . . . . . . . . . . .615
Extending WordPress with Plugins ........................................................... 615
Identifying core plugins .................................................................... 616
Distinguishing between themes and plugins .................................. 618
Finding free plugins to use on your site.......................................... 618
Comparing free and premium plugins............................................. 623
Evaluating plugins on the fly ............................................................ 624
Getting Started with Popular Free Plugins ............................................... 627
All in One SEO Pack ........................................................................... 627
Subscribe to Comments .................................................................... 629
AJAX Edit Comments ......................................................................... 629
Twitter Tools ...................................................................................... 630
Contact Form 7 ................................................................................... 632

Chapter 2: Installing and Activating Plugins. . . . . . . . . . . . . . . . . . . . .633
Installing WordPress Plugins via the Dashboard .................................... 633
Manually Installing Plugins......................................................................... 638
Upgrading Plugins ....................................................................................... 639
Upgrading automatically ................................................................... 640
Upgrading manually........................................................................... 642
Activating and Deactivating Plugins ......................................................... 642
Uninstalling Plugins ..................................................................................... 644
Uninstalling automatically ................................................................ 644
Uninstalling plugins manually .......................................................... 646

Chapter 3: Exploring Plugin Options and Settings . . . . . . . . . . . . . . . .647
Discovering Global and Page/Post Specific Settings ............................... 647
Advanced Plugin Configuration ................................................................. 649
WP Super Cache ................................................................................. 649
WordPress.com Stats ........................................................................ 652
Widget Settings ............................................................................................ 654
Setting Up a Test Site .................................................................................. 660
Finding Technical Support ......................................................................... 662

Chapter 4: Modifying Existing Plugin Code to Your Liking. . . . . . . . .663
Troubleshooting Plugin Problems............................................................. 663
Locating Plugin and Theme Conflicts ....................................................... 666
Exploring Plugin Interaction with WordPress ......................................... 669
Understanding action hooks ............................................................ 669
Understanding filter hooks ............................................................... 671
Identifying Functions within a Plugin........................................................ 673
Identifying Functionality and Output ........................................................ 674
Editing Plugin Files ...................................................................................... 677

www.it-ebooks.info

xxi


xxii

WordPress All-in-One For Dummies
Chapter 5: Creating Simple WordPress Plugins from Scratch . . . . .681
Understanding Plugin Structure ................................................................ 681
Inspecting WordPress’s default plugins ......................................... 682
Knowing the requirements ............................................................... 683
Following best practices ................................................................... 684
Creating Your First Plugin .......................................................................... 686
Setting up the plugin files ................................................................. 686
Adding the plugin header ................................................................. 687
Testing the plugin .............................................................................. 687
Fixing Problems ........................................................................................... 688
White screen of nothingness ............................................................ 688
Unexpected output error .................................................................. 689
Filtering Content .......................................................................................... 690
Setting up the plugin structure ........................................................ 691
Testing the filter ................................................................................. 692
Replacing contractions in your content ......................................... 694
Creating Shortcodes .................................................................................... 697
Setting up the plugin structure ........................................................ 697
Building a simple shortcode ............................................................. 698
Using shortcode attributes ............................................................... 700
Adding content to shortcodes ......................................................... 701
Adding Widgets ............................................................................................ 704
Coding a simple widget ..................................................................... 704
Adding an options editor to a widget .............................................. 707
Building a Settings Page .............................................................................. 714
Setting up the plugin structure ........................................................ 714
Adding a new Admin menu entry..................................................... 716
Creating a settings form .................................................................... 717
Configuring default settings.............................................................. 723
Adding settings functions ................................................................. 724
Creating the MSP_Form class ........................................................... 724
Testing the plugin .............................................................................. 728

Chapter 6: Exploring Plugin Development Best Practices . . . . . . . . .731
Attending to the Basics ............................................................................... 731
Creating a readme.txt File .......................................................................... 735
Internationalizing or Localizing Your Plugin............................................ 737
Using GetText Functions for Text Strings ....................................... 737
Creating the POT file ......................................................................... 738

Chapter 7: Plugin Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .741
Using a Plugin Template ............................................................................. 741
Making Your Plugin Pluggable ................................................................... 744
Enhancing Plugins with CSS and JavaScript............................................. 745
Calling stylesheets within a plugin .................................................. 745
Calling JavaScript within a plugin .................................................... 749

www.it-ebooks.info


Table of Contents
Custom Post Types ..................................................................................... 750
Using Custom Shortcodes .......................................................................... 753
Adding Functionality to Profile Filters ...................................................... 755
Correcting Hyperlink Problems ................................................................. 757

Book VIII: Running Multiple Sites with WordPress ...... 759
Chapter 1: An Introduction to Multiple Sites. . . . . . . . . . . . . . . . . . . . .761
Exploring the Merge from Multiuser to Network .................................... 761
Understanding the Difference between Sites and Blogs ......................... 762
Discovering When You Should Use the Network Feature ...................... 763
Setting Up the Optimal Hosting Environment.......................................... 765
Checking out shared versus dedicated hosting............................. 766
Exploring subdomains versus subdirectories ............................... 766
Choosing Linux, Apache, MySQL,
and PHP server snvironments ...................................................... 767
Adding a virtual host to the Apache configuration ....................... 768

Chapter 2: Setting Up and Configuring Network Features . . . . . . . . .771
Enabling the Network Feature ................................................................... 771
Exploring the Difference between Subdirectories and Subdomains .... 772
Installing the Network on Your Site .......................................................... 774
Disabling the Network................................................................................. 777
Dealing with Common Errors ..................................................................... 778

Chapter 3: Becoming a Network Admin. . . . . . . . . . . . . . . . . . . . . . . . .779
Exploring the Network Admin Menu ......................................................... 779
Managing Your Network ............................................................................. 782
Settings ................................................................................................ 782
Sites ..................................................................................................... 788
Users .................................................................................................... 791
Themes ................................................................................................ 794
Plugins ................................................................................................. 794
Updates ............................................................................................... 796
Stopping Spam Sign-Ups and Splogs ......................................................... 797

Chapter 4: Management of Users and Access Control . . . . . . . . . . . .799
Setting Default User Permissions .............................................................. 799
User registration ................................................................................ 800
Controlling access to sites................................................................ 801
Importing users .................................................................................. 803
Changing Defaults ........................................................................................ 804
Site-specific sign-up ........................................................................... 805
Changing roles on sign-up ................................................................ 805
Locking down menus ......................................................................... 806

www.it-ebooks.info

xxiii


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×
x