承接 moxie-lean/wp-cpt 相关项目开发

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

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

moxie-lean/wp-cpt

Composer 安装命令:

composer require moxie-lean/wp-cpt

包简介

Create custom post types easier.

README 文档

README

This library will allow you to create more easily custom post types for wordpress without too much effort.

Installation

The easiest way to install this package is by using composer from your terminal:

composer require wearenolte/wp-cpt

Or by adding the following lines on your composer.json file

"require": {
  "wearenolte/wp-cpt": "dev-master"
}

This will download the file from the packagist site and the latest version located on master branch of the repository.

After that you can need to include the autoload.php file in order to be able to autoload the class during the object creation.

include '/vendor/autoload.php';

Then you only need to create a new Cpt object with the required params for your custom post type, if you are using the library in a theme you might need to add the function in the init action as an example:

add_action( 'init', function() {
    $testimonials = new \Lean\Cpt([
        'singular' => 'Testimonial',
        'plural' => 'Testimonials',
        'post_type' => 'testimonials',
        'slug' => 'testimonial',
    ]);
    $testimonials->init();
});

The example above allow you to create a new testimonial post type on your theme.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固