Professional WordPress Design and Development 3rd Edition

Professional WordPress Design and Development 3rd Edition

Download

Introduction

HOW THIS BOOK IS STRUCTURED
This book is divided into three major sections: Chapters 1 through 4 are an overview of the WordPress system, its major functional elements, and a top‐level description of what happens when a WordPress‐generated web page is displayed. Chapters 5 through 9 build on this foundation and dive into the core of WordPress, describing internal code fl ow and data structures. This middle section is strongly developer‐oriented, and describes how to extend WordPress through plugins and customize it via themes. The last section, Chapters 10through 15, combines a developer view of user experience and optimization with the deployer requirements for performance, security, and enterprise integration. The following is a detailed chapter‐by‐chapter overview of what you can expect to fi nd in this book.

Chapter 1, “First Post,” contains a brief summary of the history of the WordPress software core, explores some popular hosting options and why community matters in a content‐centric world, and concludes with the basics of do‐it‐yourself WordPress installation and debugging.

Chapter 2, “Code Overview,” starts with the mechanics of downloading the WordPress distribution and describes its basic contents and file system layout. A top‐to‐bottom code fl ow walks you from an index or specifi c post URL, through the process of selecting posts, assembling content, and generating the displayed HTML. This chapter is a map for the more detailed code tours in the developer‐focused section.

Chapter 3, “Working with WordPress Locally,” covers the many benefi ts to working with WordPress on your local computer. This chapter also reviews the various setups for local development on a Microsoft Windows or Apple computer. Finally, you’ll cover how to deploy your local changes to a remote server using various deployment methods.

Chapter 4, “Tour of the Core,” examines the essential PHP functions within the basic WordPress engine. It serves as an introduction to the developer‐focused middle section of the book and also lays the foundation for the deployment‐, integration‐, and experience‐focused chapters in the last section. This chapter also covers using the core as a reference guide, and why it is best not to hack the core code to achieve desired customizations.

Chapter 5, “The Loop,” is the basis for the developer‐centric core of this book. The WordPress main loop drives the functions of creating and storing content in the MySQL database, as well as extracting appropriate chunks of it to be sorted, decorated, and nested under banners or next to sidebars, in both cases generating something a web browser consumes. This chapter disassembles those processes of creating, saving, and publishing a new post as well as displaying content that has been stored in the WordPress MySQL databases. The underlying database functions and the management of content metadata are covered in more detail to complete a thorough view of WordPress’s internal operation.

Chapter 6, “Data Management,” is the MySQL‐based counterpart to Chapter 5 . The core functions create, update, and manipulate entries in multiple MySQL database tables, and this chapter covers the database schema, data and metadata taxonomies used, and the basic relations that exist between WordPress elements. It also includes an overview of the basic query functions used to select and extract content from MySQL, forming a basis for extensions and custom code that needs to be able to examine the individual data underlying a blog.

Chapter 7, “Custom Post Types, Custom Taxonomies, and Metadata,” explores the different types of content and associated data in WordPress. You’ll cover how to register and work with custom post types for creating custom content in WordPress. Custom taxonomies are also dissected, and we’ll dive into the various setups with examples. Finally you’ll cover post metadata and the proper ways to store arbitrary data against posts in WordPress.

Chapter 8, “Plugin Development,” starts with the basic plugin architecture and then explores the hook, action, and fi lter interfaces that integrate new functionality around the WordPress core. This chapter demonstrates the interposition of functions into the page composition or content management streams and how to save plugin data. Examples of building a plugin using a simple framework outline the necessary functionality of any plugin. This chapter also covers creation of widgets, simpler‐to‐use plugins that typically add decoration, additional images, or content to a blog sidebar; many plugins also have a widget for easier management. Publishing a plugin to the WordPress repository and pitfalls of plugin confl ict round out the discussion of WordPress’s functional extensions.

Chapter 9, “Theme Development,” is the display and rendering counterpart to Chapter 8. Plugins add new features and functions to the core, whereas themes and CSS page templates change the way that content is displayed to readers. Starting with a basic theme, this chapter covers writing a theme, building custom page templates, menu management, widget areas, post formats, theme installation, and how thematic elements are used by the functions described in previous chapters. This chapter ends the deep developer‐focused middle section of the book.

Chapter 10, “Multisite,” explores the popular Multisite feature of WordPress. You’ll learn the advantages of running your own Multisite network and how to properly install Multisite, work in a network, create sites and users, manage themes and plugins, and even conduct domain mapping. The last part of the chapter explores coding for Multisite and the various functions and methods available for use.

Chapter 11, “Migrating to WordPress,” looks at the migration process when migrating existing data to a WordPress website. You’ll learn about the migration process and data mapping guides, and how to work with a newer tool, WP‐CLI, for larger migrations.

Chapter 12, “Crafting a User Experience,” looks at a WordPress installation from the perspective of a regular or potential reader. Usability, testing, and the ease of finding information within a WordPress website form the basics, with added emphasis on web standards for metadata and search engine optimization so a page, or a specific post, can be found through an appropriate Google search. This chapter focuses on how to get your content to show up elsewhere on the web. Alternatives for adding search functionality, one of WordPress’s weaknesses, are discussed, along with content accessibility and delivery to mobile devices.

Chapter 13, “Securing WordPress,” deals with good and bad popularity. Keeping a WordPress installation safe from malicious attackers is a key part of configuration and management, and this chapter covers the general best practices and addresses them with some of the more popular security and anti‐spam plugins and features.

Chapter 14, “Application Framework,” goes beyond blogging to examples of WordPress as an application framework to be used as a base when creating web applications. You’ll explore popular application framework features and how they relate in WordPress.

Chapter 15, “WordPress in the Real World,” tackles issues of scale and integration. WordPress addresses deficiencies in “enterprise scale” content management tools, and building on the mechanisms covered in Chapter 12 , this chapter shows how to use WordPress in real‐world situations with confidence.

Chapter 16, “WordPress Developer Community,” is an introduction to contributing to the WordPress ecosystem by working on the core, submitting plugins or themes, adding to the documentation canon, and assisting other developers. An overview of WordPress sister projects such as bbPress for forums is provided along with a brief summary of other developer resources and a glossary of WordPress context‐sensitive terms.

WHAT YOU NEED TO USE THIS BOOK
You’ll need at least a rudimentary understanding of HTML and some knowledge of cascading style sheets (CSS) to make use of the theme and user experience sections of the book. Experience in writing and debugging PHP code is a prerequisite for more advanced developer sections, although if you’re just going to make changes based on the samples in this book, you can use the code as a template and learn on the fl y. A basic knowledge of databases, especially the syntax and semantics of MySQL, is in order to make the most out of the chapter on data management as well as develop plugins that need to save data.

It’s helpful to have an interactive development environment in which to view PHP code, or PHP code sprinkled through HTML pages. Choosing a set of developer tools often borders on religion and deep personal preference (and we know plenty of coders who believe that vi constitutes a development environment). Some of the more user‐friendly tools will make walking through the WordPress code easier if you want to see how functions used in the examples appear in the core.

Most important, if you want to use the code samples and examples in this book, you’ll need a WordPress website in which to install them. Chapter 1 covers some basic WordPress hosting options as well as the simple mechanics of downloading the components and installing WordPress on a desktop or test machine for debugging and closer inspection. Chapter 3 covers how to install and configure WordPress locally on your computer.

Finally, some people might argue that to really take advantage of WordPress you need to be able to write, but that ignores the basic beauty of the WordPress platform: It takes the power of the printing press to an individual level. This book isn’t about what you say (or might say); it’s about how you’re going to get those ideas onto the web and how the world will see them and interact with your blog.
Share This