Download the PHP package pelmered/post-types-creator without Composer

On this page you can find all versions of the php package pelmered/post-types-creator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package post-types-creator

Post types creator

Build Status

Helper plugin that provides an easy interface for creating fully translated custom post types and taxonomies according to best practice with only a few lines of code for WordPress.

Contents

Features

Planned features for version 2.0

Common problems & troubleshooting

The plugin is very simple to use if you know basic PHP. Most of the problems you are likely to run into is related to WordPress built in permalink cache or messed up or non-existing meta data for sorting(the posts will not show up in the post linst in wp-admin). To fix both those problems. Just add &ptc-reinit=1 to the URL/querystring anywhere in wp-admin to run a force reinitialization that will fix the problems, for example: http://example.com/wp-admin/edit.php?post_type=page&ptc-reinit=1

Installation

Composer

Add the repository and add pelmered/post-types-creator to the require section in your composer.json. Example of typical full composer.json file:

Note: Edit the installer paths to reflect your installation

Normal manual install

First, install the plugin as usnual by uploading the plugin to you plugins folder, typically wp-content/plugins/.

Use the example plugin as a boilderplate for your custom post type plugin

Secondly, copy the example plugin from example-plugin/my-custom-post-types/ in this plugin to your plugins folder, typically wp-content/plugins/ or install the example plugin from the zip file in example-plugin/my-custom-post-types.zip. Change the name, description etc of the plugin and edit the data acording to your needs.

Usage

Adding custom post types

Minimal:

Registers a post type with the slug stores and the labels tranlatable based on Post type plural (plural) and Post type singular (singular).

Example / typical:

Same as minimal, but allso adds a description, makes it drag and drop sortable in the admin list, adds a custom admin column and overides some register_post_type() defaults, for example connecting the taxonomy area(see example below).

Adding taxonomies:

Typical taxonomy that is drag and drop sortable in the normal admin list view and connected to the stores post type in the example above.

For more examples, or help to get started see the example plugin in example/example-plugin.php. Copy the example plugin to your plugins directory for the fastest way to get started.

Documentation

Adding features to post types from core or other plugins

Example for adding sortable to WooCommerce product categories

Labels & description

You only need to send in a singular and a plural version of the post type label, all other labels are automatically generated.

If you want to override something, you can hook into the filter pe_ptc_post_type_labels like this:

Extra arguments

admin_columns

sortable

Taxonomy filters

Pass true for making filters of all taxonomies for the post type

        'taxonomy_filters'               => false,

Overriding register_post_status() defaults

All the defaults and arguments that you can pass in to register_post_status()


All versions of post-types-creator with dependencies

PHP Build Version
Package Version
Requires composer/installers Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pelmered/post-types-creator contains the following files

Loading the files please wait ....