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

Developing a post attachments plugin

In the two preceding sections, we discussed the steps for building a basic plugin and the life cycle events. In this section, we will be developing a plugin, while covering the implementation of life cycle events and critical features in plugin development. Let's summarize the requirement of the plugin.


The use of blog posts and displaying dynamic content after the post is common in most WordPress sites. We already looked at the process of adding content after the post, in the first plugin we developed. Now, we are going to extend the feature to allow attachment downloads after the post. In some sites, it's essential to allow users to download files related to the post. This plugin will allow the administrator to add files to a post from the backend and let users download these files by displaying them after the post's content.

Let's start the development of our plugin by creating a new directory called wpquick-post-attachments inside the wp-content/plugins...