WordPress as an Application Framework

Generally, we use full-stack development frameworks such as Laravel, CodeIgniter, and Zend for developing advanced applications. These frameworks provide a set of modules as a base structure where we can build applications on top of it. The core modules in development frameworks include routing, template management, database layer abstraction, security, user management, validations, error handling, and many more. We can use these modules to speed up the development process instead of coding everything from scratch. WordPress was introduced as a blogging tool and transformed into the most popular content management system out there. However, it was not built as a web application framework.

The features in recent versions, the flexibility of core modules, and the similarity of these modules to a development framework module have made developers start using WordPress for advanced application development. The plugin-based architecture and availability of many custom modules through existing plugins has simplified the process of adapting WordPress into advanced applications.

Managing data is one of the more important aspects of applications. We will be using built-in custom post types and custom forms to capture, process, and display the data requirements of advanced applications. We will also be focusing on routing to support additional features without the use of WordPress features, as well as the REST API for enabling the data for other services and applications. Also, we will be looking at the process of working with built-in and custom database tables while understanding the core features for working with the data that we retrieved from the database.

The goal of this chapter is to let you adapt the existing WordPress features into advanced applications by extending them through WordPress hooks.

In this chapter, we will cover the following recipes:

  • Managing advanced data with custom post types
  • Creating and managing advanced post fields
  • Working with WordPress loop
  • Displaying advanced post fields
  • Restring post/page content with shortcode
  • Capturing data with dynamic forms
  • Creating custom routes
  • Storing custom data in existing tables
  • Creating and managing custom tables
  • Using the REST API
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.72.15