ormeecommunity / skypress-custom-post-type
dev-master
2020-04-22 14:58 UTC
Requires
- php: >=7.2
- ormeecommunity/skypress-core: *
This package is not auto-updated.
Last update: 2024-11-05 18:15:27 UTC
README
Getting started
composer require ormeecommunity/skypress-custom-post-type
Use a plugin
<?php /* Plugin Name: Example Skypress Description: Example Skypress Author: OrmeeCommunity Domain Path: /languages/ */ if (!defined('ABSPATH')) { exit; } require_once __DIR__ . '/vendor/autoload.php'; use Skypress\Core\Kernel; Kernel::execute('plugin', ['file' => __FILE__, 'slug' => 'example-skypress'], [ 'custom-post-type' => true, // Active custom post type module ]);
Add a custom post type
Create a folder mu-plugins/skypress/custom-post-types/
folder.
Create a ".json" file that you call as you wish (eg. movie.json
=> mu-plugins/skypress/custom-post-types/movie.json
) :
{ "key" : "movies", "params" : { "public" : true, "publicly_queryable" : true, "show_ui" : true, "show_in_menu" : true, "query_var" : true, "labels" : { "name": "Movie" }, "supports" : [ "title", "editor","author" ] } }