Creating property custom post types

First, we need to create a separate class for handing property-related features as we are using an object oriented plugin. So, create a new directory called classes inside the main plugin directory, and add a new file called class-wqcpt-property.php. Then, we need to include this file in our plugin and create an object to initialize the features. We need to add the following line inside the includes function of the WPQuick_CPT class to include the file:

require_once WQCPT_PLUGIN_DIR . 'classes/class-wqcpt-model-property.php';

Next, we need to create an object of this class by using the following line of code inside the instance function:

self::$instance->model_property  = new WQCPT_Model_Property();

Now, ...

Get WordPress Development Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.