承接 pkj/pkj-any-parent-type 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pkj/pkj-any-parent-type

Composer 安装命令:

composer require 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.

README 文档

README

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

Alt text

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:

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.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPLv2
  • 更新时间: 2014-08-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固