2017 © Pedro Peláez
 

library cpt

Craate custom post types more easily

image

moxie-leean/cpt

Craate custom post types more easily

  • Thursday, March 31, 2016
  • by mitogh
  • Repository
  • 4 Watchers
  • 1 Stars
  • 662 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Custom Post Types

This library will allow you to create more easily custom post types for wordpress without too much effort., (*1)

Installation

The easiest way to install this package is by using composer from your terminal:, (*2)

composer require moxie-leean/cpt

Or by adding the following lines on your composer.json file, (*3)

"require": {
  "moxie-leean/cpt": "dev-master"
}

This will download the file from the packagist site and the latest version located on master branch of the repository., (*4)

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

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:, (*6)

add_action( 'init', function() {
    $testimonials = new \Leean\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., (*7)

The Versions

31/03 2016

dev-master

9999999-dev https://github.com/moxie-leean/cpt

Craate custom post types more easily

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

wordpress cpt post types

31/03 2016

0.2.0

0.2.0.0 https://github.com/moxie-leean/cpt

Craate custom post types more easily

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

wordpress cpt post types

23/01 2016

0.1.0

0.1.0.0 https://github.com/moxie-leean/cpt

Craate custom post types more easily

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

wordpress cpt post types

23/01 2016

dev-develop

dev-develop https://github.com/moxie-leean/cpt

Craate custom post types more easily

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

wordpress cpt post types