Book Image

Wordpress Development Quick Start Guide

By : Rakhitha Nimesh Ratnayake
Book Image

Wordpress Development Quick Start Guide

By: Rakhitha Nimesh Ratnayake

Overview of this book

WordPress is the most used CMS in the world and is the ideal way to share your knowledge with a large audience or build a profitable business. Getting started with WordPress development has often been a challenge for novice developers, and this book will help you find your way. This book explains the components used in WordPress development, when and where to use them, and why you should be using each component in specific scenarios. You begin by learning the basic development setup and coding standards of WordPress. Then you move into the most important aspects of the theme and plugin development process. Here you will also learn how themes and plugins fit into the website while learning about a range of techniques for extending themes and plugins. With the basics covered, we explore many of the APIs provided by WordPress and how we can leverage them to build rapid solutions. Next, we move on to look at the techniques for capturing, processing, and displaying user data when integrating third-party components into the site design. Finally, you will learn how to test and deploy your work with secure and maintainable code, while providing the best performance for end users.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
Packt Upsell

Working with the WordPress theme template hierarchy

A WordPress theme can be built with just three files: style.css, index.php, and comments.php. However, the complete template hierarchy can support quite a large number of sub-templates, flexible enough to cater for the advanced requirements of many sites. More often than not, developers will be working on less than ten files in this hierarchy. However, the knowledge of the complete template hierarchy may come handy in projects with advanced requirements. Let's take a look at the following diagram, which consists of the types of pages used in WordPress to handle the initial request:

There are six paths to handle the user request based on the loaded content. Archive Page and Singular Page are the most complex yet flexible among these, and have a tall structure. Let's identify the main purpose of each of these pages before moving into the complete template hierarchy:

  • Archive Page: This is usually used to display the posts list, category posts...