PKJ Any Parent Type

This plugin let's you define what parent post types that are allowed for each custom post type. Configurable in admin.

Author:Petter Kjelkenes (profile at wordpress.org)
WordPress version required:3.0.1
WordPress version tested:3.9.2
Plugin version:0.0.3
Added to WordPress repository:07-08-2014
Last updated:07-08-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://github.com/peec/pkj-any-parent-type
Total downloads:288
plugin download
Click to start download

The PKJ Any Parent Type plugin lets you customize what parent post types that are allowed for each custom post type. This makes it possible to have one-to-many relationship between custom post types and not just itself.

Lets say you have two custom post-types:

  • Person
  • Activiy

The Person CPT contains, well, a person. Each person can have many Activity. This is not possible using vanilla wordpress without many hacks, this plugins helps you do this easily! Just configure it in the plugins options page that "The Activity type can have Parent as Person", and the "Person can have parent as "Page".

Now we create a post of type Page named "Persons".

We create a post type of "Person" titled "Peter" and set the parent page to "Persons".

We create a post type of "Activity" named "Ran two miles" and set the parent person to "Peter".

Now you have great urls:

Features:

  • Easy to install, just add the plugin and go into the settings page for the plugin!
  • Customizable settings in admin for each custom post type, select what types you can put as parent for each CPT.
  • This plugins sorts all rewrites of URLs for you, so it actually works like expected.