ebook img

WordPress 3 complete : create your own complete website or blog from scratch with WordPress PDF

325 Pages·2011·10.5 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview WordPress 3 complete : create your own complete website or blog from scratch with WordPress

WordPress 3 Complete > m o c k. oo Create your own complete website or blog from scratch b e w o with WordPress w w. w w < k o o B e w! o W m o d fr a o nl w o April Hodge Silver D BIRMINGHAM - MUMBAI WordPress 3 Complete Copyright © 2011 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: January 2010 Production Reference: 1180111 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-849514-10-1 www.packtpub.com Cover Image by Charwak A ([email protected]) Table of Contents > m o k.c Preface 1 o o b Chapter 1: Introduction to WordPress 7 e w o What is WordPress? 7 w w. Use it for a blog or a website 8 w w Blog: Definition and common terms 8 < k Common terms 8 o Bo Why choose WordPress? 10 e w! A long time in refining 10 o W Active in development 10 m Large community of contributors 10 o d fr Amazingly extendable 10 a nlo Detailed feature list 11 w o New feature list since 2.7 11 D Learning more 13 Online WordPress resources 13 WordPress news 13 The Codex 14 Support from other users 15 Theme and plugin directories 15 WordPress.com 15 Summary 16 Chapter 2: Getting Started 17 Where to build your WordPress website 17 Using WordPress.com 19 Installing WordPress manually 22 Preparing the environment 22 Downloading WordPress 23 Upgrading from an earlier version of WordPress 24 Uploading the files 25 Table of Contents Installing WordPress 27 Learning more 32 The WP Admin panel 32 Changing general blog information 35 Your first post 36 Your first comment 39 Retrieving a lost password 41 Summary 41 Chapter 3: Creating Blog Content 43 WP Admin conventions 43 Lists of items 43 Posting on your blog 45 Adding a simple post 45 Common post options 48 Categories and tags 49 Images in your posts 51 Using the Visual editor versus the HTML editor 57 Drafts, timestamps, and managing posts 58 Advanced post options 60 Excerpt and the MORE tag 60 Trackbacks 61 Discussion 62 Custom Fields 63 Protecting content 64 Pretty permalinks 65 Additional writing options 66 Press This 66 Posting via e-mail 67 Discussion on your blog—comments 68 Adding a comment 68 Discussion settings 70 Submission, notification, and moderation settings 70 When to moderate or blacklist a comment 72 Avatar display settings 73 Moderating comments 74 How to eliminate comment spam 76 Getting a WordPress.com API key 77 Activating Akismet 78 Adding and managing categories 80 Summary 81 Chapter 4: Pages, Plugins, Image Galleries Menus, and More 83 Pages 83 Adding a page 84 Managing pages 88 [ ii ] Table of Contents Menus 88 Adding a Menu 89 Displaying a Menu 92 Widgets 93 Links 94 Adding a new link 96 Displaying links 97 Managing links and categories 99 Media library 100 Adding plugins 102 Finding your plugin 103 Installing and activating the plugin 103 Auto-installation 104 Download, (unzip?), upload 105 Configuring and/or implementing—if necessary 107 Adding an image gallery 108 Choosing a post or page 109 Uploading images 110 Using a lightbox plugin 114 Making your website mobile-friendly 116 Summary 118 Chapter 5: Choosing and Installing Themes 119 Finding themes 120 WordPress Theme Directory 120 Finding more themes 123 Some theme basics 123 What makes a theme? 124 Factors to consider when choosing a theme 124 Installing and changing themes 125 Adding a theme within the WP Admin 125 Downloading, extracting, uploading 129 Summary 131 Chapter 6: Developing Your Own Theme 133 Setting up your design 134 Designing your theme to be WordPress-friendly 134 Converting your design to code 136 Examining the HTML structure 137 Examining the CSS 140 Converting your build into a theme 146 Creating the theme folder 146 [ iii ] Table of Contents Adding WordPress content 151 The <head> tag 151 The header and footer 152 The sidebar 155 Main column—the loop 157 Creating templates within your theme 162 Understanding the WordPress theme 162 Breaking it up 163 header.php 163 footer.php 163 sidebar.php 164 Your four template files 165 Archive template 166 Single template 168 Page template 171 Generated classes for body and post 172 Other WordPress templates 173 Creating and using a custom template 174 Making your theme widget-friendly 178 Making sure your sidebar is one big <ul> tag 178 Adding functions.php 179 Adding conditional code to sidebar 179 Adding some widgets 180 Further widgetizing options 181 Learning more 181 Enabling a menu in your theme 182 Creating a child theme 183 Creating the new theme directory 183 Creating the stylesheet 183 Using your child theme 184 Sharing your theme 185 Summary 186 Chapter 7: Feeds and Podcasting 187 Feed basics 188 Feed readers 188 Learning more 189 Your built-in WordPress feeds 190 Adding feed links 191 Feeds for the whole website 192 Feeds for categories 194 Feeds for post comments 195 [ iv ] Table of Contents Tracking subscribers with FeedBurner 196 Burn your feed on FeedBurner 196 FeedBurner plugin 197 Podcasting 198 Creating a podcast 198 Record yourself 198 Make a post 199 Dedicated podcasting 201 Podcasting plugins 203 Using a service to host audio files for free 204 Summary 204 Chapter 8: Developing Plugins and Widgets 205 Plugins 205 Plugin code requirements 206 Basic plugin—adding link icons 206 Naming and organizing the plugin files 207 Writing the plugin's core functions 208 Adding hooks to the plugin 209 Trying out the plugin 211 Adding an admin page 213 Adding management page functions 214 Modifying the regex() function 216 Adding hooks 217 Trying out the plugin 217 Plugin with DB access—capturing searched words 218 Getting the plugin to talk to the database 219 Adding management page functions 219 Adding hooks 220 Trying out the plugin 221 Learning more 222 Widgets 223 Recent posts from a Category Widget 223 Naming the widget 224 Widget structure 224 Widget initiation function 225 Widget form function 226 Widget save function 228 Widget print function 229 Initiate and hook up the widget 230 Final widget code 230 Trying out the widget 233 Learning more 234 Bundling a widget with a plugin 235 [ v ] Table of Contents Shortcodes 235 How do shortcodes work? 235 Creating a simple shortcode 235 Adding options to the shortcode 237 Enabling shortcodes in widgets 239 Summary 240 Chapter 9: Community Blogging 241 Concerns for a multiuser blog 241 Users roles and abilities 242 Administrator 242 Editor 242 Author 244 Contributor 245 Subscriber 245 Managing users 246 Enabling users to self-register 249 Learning more 250 User management plugins 251 Creating a multi-site website 252 Summary 253 Chapter 10: Creating a Non-Blog Website 255 Our client is a bookstore 255 The Design 256 New features covered in this chapter 261 Introducing the initial theme 261 What we are starting with 262 Initial theme files and functionality 262 functions.php 262 header.php 263 footer.php 264 index.php 264 Setting up the starter content 265 Checking out the frontend 268 Adding plugins 270 Contact Form 7 271 April's Call Posts 273 Smooth Slider 275 Installing the plugin 275 Adding content to the plugin 276 Adding the plugin to your theme 277 [ vi ] Table of Contents Creating a custom post type: book 279 Registering a new post type 279 Adding labels 280 Adding messages 281 Creating book template files 284 Registering and using a custom taxonomy 288 Customizing the admin display 290 Finalizing the bookstore website 292 Summary 293 Chapter 11: Administrator's Reference 295 System requirements 295 Enabling permalinks 296 The importance of backing up 296 Easy, quick, frequent content backups 296 Backing up everything 297 Verifying your backups 297 Upgrading WordPress 298 What about the built-in upgrader? 298 Do it gradually for a big jump 298 Steps for upgrading 298 Backing up your database 299 Backing up your WordPress files 299 Put WordPress in Maintenance Mode 299 Deactivating all your plugins 299 Downloading and extracting WordPress 300 Deleting old files 300 Uploading the new files 300 Running the WordPress upgrade program 300 Updating permalinks and .htaccess 301 Installing updated plugins and themes 301 Migrating or restoring a WordPress site 301 Setting file permissions 303 What are file permissions? 303 Permissions for WordPress 303 How to set permissions 304 Troubleshooting 304 Troubleshooting during installation 304 Headers already sent 304 Page comes with only PHP code 305 Cannot connect to MySQL database 305 [ vii ] Table of Contents Basic troubleshooting 306 Cannot see posts 306 Making a site totally private 306 I don't receive the e-mailed passwords 307 Tips for theme development 307 Template tags 307 Class styles generated by WordPress 310 Learning more 310 Summary 311 Index 313 [ viii ]

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.