2017 © Pedro Peláez
 

wordpress-plugin pkj-any-parent-type

This plugin lets you select what parent pages you allow to set for custom post types. By default only the same type is allowed.

image

pkj/pkj-any-parent-type

This plugin lets you select what parent pages you allow to set for custom post types. By default only the same type is allowed.

  • Friday, August 8, 2014
  • by peec
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PKJ Any Parent Type, Wordpress Plugin

This plugin lets you select what parent pages you allow to set for custom post types. By default only the same type is allowed., (*1)

Alt text, (*2)

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., (*3)

Lets say you have two custom post-types:, (*4)

  • 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"., (*5)

Now we create a post of type Page named "Persons"., (*6)

We create a post type of "Person" titled "Peter" and set the parent page to "Persons"., (*7)

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

Now you have great urls:, (*9)

  • http://youtsite.com/persons <- Page
  • http://youtsite.com/persons/peter <- Person
  • http://youtsite.com/persons/peter/ran-two-miles <- Activity

Creating custom post types.

There are just one thing to remember, set "hierarchical" to true when creating new post types. Do not include the "rewrite" option., (*10)

The Versions

08/08 2014

dev-master

9999999-dev https://github.com/peec/pkj-any-parent-type

This plugin lets you select what parent pages you allow to set for custom post types. By default only the same type is allowed.

  Sources   Download

GPLv2 or later

The Requires

 

plugin wordpress grid source

03/08 2014

0.0.1

0.0.1.0 https://github.com/peec/pkj-any-parent-type

This plugin lets you select what parent pages you allow to set for custom post types. By default only the same type is allowed.

  Sources   Download

GPLv2 or later

The Requires

 

plugin wordpress grid source