October 2018
Beginner
300 pages
8h 34m
English
WordPress taxonomies are a way of grouping posts or custom post types. We already looked at taxonomies while discussing database tables and templates in previous chapters. In this section, we are going to look at how taxonomies fit into custom post types and their implementation. In this scenario, we are building a property listing site. We can use taxonomies to group properties based on the property type. Let's begin by adding the following action to the constructor of the WQCPT_Model_Property class:
$this->property_category_taxonomy = 'wqcpt_property_listing_type';add_action( 'init', array( $this, 'create_property_custom_taxonomies' ) );
As with custom post types, we have to use the init action to register ...
Read now
Unlock full access