1. Trang chủ
  2. » Công Nghệ Thông Tin

Beginning WordPress 3 pps

433 158 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 433
Dung lượng 9,06 MB

Nội dung

                          THE EXPERT’S VOICE ®  IN WEB DEVELOPMENT Beginning WordPress 3 Make great websites the easy way Stephanie Leary A complete beginner's guide to WordPress that shows you how to create a customized website for yourself, your business, or your social network Beginning WordPress 3    Stephanie Leary Beginning WordPress 3 Copyright © 2010 by Stephanie Leary All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2895-0 ISBN-13 (electronic): 978-1-4302-2896-7 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. President and Publisher: Paul Manning Lead Editor: Ben Renow-Clarke Technical Reviewer: Shelley Keith Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Laurin Becker, Fran Parnell Copy Editor: Mary Behr Compositor: Bytheway Publishing Services Indexer: Toma Mulligan Artist: April Milne Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer- sbm.com, or visit www.springeronline.com. For information on translations, please e-mail rights@apress.com, or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at www.apress.com. You will need to answer questions pertaining to this book in order to successfully download the code. iii Contents at a Glance  Contents iv  About the Author xvi  About the Technical Reviewer xvii  Acknowledgments xviii  Introduction xix  Chapter 1: About WordPress 1  Chapter 2: Installing and Upgrading 15  Chapter 3: Dashboard and Settings 41  Chapter 4: Working with Content 61  Chapter 5: Importing Content 105  Chapter 6: Creating a Basic Theme 125  Chapter 7: Creating an Advanced Theme 173  Chapter 8: Creating Widgets 205  Chapter 9: Creating Plugins 225  Chapter 10: Users and Roles 271  Chapter 11: Performance and Security 289  Chapter 12: Custom Content Types, Taxonomies, and Fields 309  Chapter 13: Setting up the Network 347  Appendix 1: Plugin Index 373  Appendix 2: Theme Functions 381  Appendix 3: Plugin Recipes 385  Index 389 iv Contents  Contents at a Glance iii  Contents iv  About the Author xvi  About the Technical Reviewer xvii  Acknowledgments xviii  Introduction xix  Chapter 1: About WordPress 1 Why WordPress? 1 Easy to Set Up 1 Easy to Use 2 Easy to Extend 3 The Business Benefits of WordPress 4 Sites Built with WordPress 4 Personal Blogs 4 Blog Networks 6 Social Networks 8 Colleges and Universities 9 Small Businesses 10 WordPress Tour 11 Anatomy of a post 12 Summary 14  Chapter 2: Installing and Upgrading 15  CONTENTS v System Requirements 15 One-click Installation 15 Installation Using the Web Interface 16 Logging In 20 Editing and Uploading wp-config.php 22 Troubleshooting 23 Installing Themes 25 Installing Plugins 28 Plugging the gaps: Essential Plugins 32 Upgrading Plugins 33 Upgrading WordPress 35 Automatic Upgrades 36 Manual Upgrades 38 Moving a WordPress Site 39 Summary 40  Chapter 3: Dashboard and Settings 41 The Dashboard 42 QuickPress 43 Incoming Links 43 WordPress Development Blog 44 Plugin dashboard widgets 44 Dashboard Widgets and Users 44 Settings 45 General 45 Writing 47 Reading 48 Discussion 49 Media 54  CONTENTS vi Privacy 56 Permalinks 57 Summary 59  Chapter 4: Working with Content 61 Posts 61 Content 63 Permalinks 70 Publish Settings 70 Categories 71 Tags 72 Featured Images 74 Excerpts 75 Comments and Trackbacks 75 Revisions 77 Custom Fields 78 Pages 78 Page Attributes: Parents, Templates, and Order 78 Posts vs. Pages: Same, but Different 82 Posts are Pages; Pages are Posts 83 Editing Posts and Pages 83 Media Files 88 Images and Galleries 88 Video 94 Audio 96 Other File Types 97 The Media Library 97 Links 98 Basic Link Attributes 98  CONTENTS vii Link Relationships: XFN™ 99 Advanced Link Attributes 101 Link Feed 101 Feeds 101 Summary 103  Chapter 5: Importing Content 105 Before Importing 105 Importing Blogs 105 Importing from WordPress.com 107 Importing from Blogger 110 Importing Joomla or Mambo Sites 113 Importing Other MySQL-based Sites 116 Drupal 116 Importing HTML Files 117 After Importing: Fixing What’s Broken 120 Link URLs 120 Paths to Linked Files 121 Truncated or Garbled Content 122 Summary 123  Chapter 6: Creating a Basic Theme 125 Using Widgets 125 Using Menus 127 Creating a Menu 127 Editing Menu Items 128 Creating Multiple Menus 129 Using Header and Background Images 130 Turning HTML into a Theme 132  CONTENTS viii Header 134 Body 135 Footer 141 Stylesheet 141 Template Tags 142 Theme Files 144 Theme File Hierarchy 145 The Home Page 146 Single Posts 146 Pages 146 Custom Content Types 146 Category Archives 147 Tag Archives 147 Custom Taxonomy Archives 147 Author Archives 148 Date-Based Archives 148 Search Results 148 Error 404 (File Not Found) Page 148 Attachment Pages 149 Listing Comments 149 Including Additional Files 151 Styling Content 151 Changing Appearance Based on Context 151 Conditional Tags 152 Posts vs. Pages 153 Categories 153 Author Archives 154 Search Results 155 [...]... 33 0 Including Custom Content Types in Your Theme 33 3 Feeds for Custom Content Types 33 5 Custom Fields in Custom Content Types .33 6 Creating the Custom Fields 33 7 Verifying and Saving User Input 34 0 All Together 34 1 Summary .34 6 xiii CONTENTS Chapter 13: Setting up the Network 34 7 Network Requirements... wp-config.php 30 0 Changing File Locations .30 0 Moving wp-config.php 30 1 Giving WordPress Its Own Subdirectory 30 1 Moving wp-content 30 2 Database Security 30 3 Changing the Table Prefix 30 3 Backing Up the Database and Files 30 4 Monitoring Security Problems .30 5 Summary .30 7 Chapter 12:... Requirements 34 7 Subdomains 34 7 Subfolders 34 8 Activating the Network 34 8 Configuring the Network 35 0 Operational Settings 35 1 Dashboard Settings 35 1 Registration Settings 35 2 New Site Settings 35 3 Upload Settings 35 4 Menu Settings 35 6 Creating Additional... Sites .35 6 Network Users .35 7 Splogs 35 8 Network Plugins and Themes 35 9 Plugin and Theme Options 36 1 Upgrading the Network 36 1 Mapping Domains 36 2 BuddyPress 36 4 Features 36 4 Installation 36 6 Using BuddyPress 37 1 Summary .37 1 Appendix... .37 1 Appendix 1: Plugin Index 37 3 Appendix 2: Theme Functions 38 1 xiv CONTENTS Appendix 3: Plugin Recipes 38 5 Wiki 38 5 Document Sharing 38 6 Project Management 38 7 Newsroom .38 7 Twitter Archive 38 8 News Clipping Archive 38 8 Index 38 9 xv About the Author Stephanie Leary began... and Fields .30 9 Custom Taxonomies 30 9 Non-hierarchical Taxonomies 31 2 Hierarchical Taxonomies 31 5 Using Custom Taxonomies 31 6 Custom Content Types 32 1 Non-hierarchical (Post-like) Content Types 32 4 Hierarchical (Page-like) Content Types 32 7 Custom Taxonomies for Custom Content Types 32 8 Changing Edit... with WordPress These are just a few examples of WordPress sites For more, visit the Showcase at www .wordpress. org Personal Blogs Many of the web’s most famous designers have adopted WordPress: Jeffrey Zeldman, Eric Meyer, Jason Santa Maria, Douglas Bowman, Dan Cederholm, and Aarron Walter are a few Famous geeks Robert Scoble, Chris Pirillo, and Leo Laporte use WordPress, too Celebrities using WordPress. .. Roddick 4 CHAPTER 1 ABOUT WORDPRESS Figure 1-1 Author Jennifer Crusie’s site 5 CHAPTER 1 ABOUT WORDPRESS Figure 1-2 Actor Stephen Fry’s site Blog Networks The New York Times, Edublogs, and wordpress. com are large sites with anywhere from a few dozen to hundreds of thousands of individual blogs These sites use the Network feature in WordPress 3. 0, formerly a separate product known as WordPress MU (Multi-User)... A simple WordPress home page using the Twenty Ten default theme 11 CHAPTER 1 ABOUT WORDPRESS Let’s break down this page and see how WordPress put it together At the top of the page, above the image, you’ll see the site title you chose when you installed WordPress Off to the right is the tagline (“Just another WordPress blog”), which you can specify on the General Settings page (see Chapter 3) The black... database first) As of version 3. 0, you can easily expand your WordPress installation into a network of connected sites The setup process is just a little more involved than the basic installation, and your host has to meet a few additional requirements, which I’ll go over in chapter 13 Easy to Use WordPress has an amazingly user-friendly administration interface In 2008, the WordPress team worked with . wp-config.php 30 0 Changing File Locations 30 0 Moving wp-config.php 30 1 Giving WordPress Its Own Subdirectory 30 1 Moving wp-content 30 2 Database Security 30 3 Changing the Table Prefix 30 3 Backing. Content Types 32 8 Changing Edit Screen Columns 33 0 Including Custom Content Types in Your Theme 33 3 Feeds for Custom Content Types 33 5 Custom Fields in Custom Content Types 33 6 Creating the. Fields 33 7 Verifying and Saving User Input 34 0 All Together 34 1 Summary 34 6  CONTENTS xiv  Chapter 13: Setting up the Network 34 7 Network Requirements 34 7 Subdomains 34 7 Subfolders 34 8

Ngày đăng: 12/08/2014, 09:20