All Projects → jjgrainger → Posttypes

jjgrainger / Posttypes

Licence: mit
Simple WordPress custom post types.

Labels

Projects that are alternatives of or similar to Posttypes

Wp Reactivate
React boilerplate for WordPress plugins
Stars: ✭ 303 (-6.19%)
Mutual labels:  wordpress
Wp Bootstrap Navwalker
A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.
Stars: ✭ 3,290 (+918.58%)
Mutual labels:  wordpress
B4st
A Bootstrap 4 Starter Theme, for WordPress
Stars: ✭ 318 (-1.55%)
Mutual labels:  wordpress
Mokore
🎉Wordpress二次元简约个人博客主题by江程训
Stars: ✭ 306 (-5.26%)
Mutual labels:  wordpress
Customizer Custom Controls
WordPress Customizer Custom Controls
Stars: ✭ 311 (-3.72%)
Mutual labels:  wordpress
Slickstack
SlickStack is a free LEMP stack automation script written in Bash designed to enhance and simplify WordPress provisioning, performance, and security.
Stars: ✭ 311 (-3.72%)
Mutual labels:  wordpress
Cortex
Routing system for WordPress
Stars: ✭ 300 (-7.12%)
Mutual labels:  wordpress
Django Wordpress
WordPress models and views for Django.
Stars: ✭ 318 (-1.55%)
Mutual labels:  wordpress
Custom Field Suite
Custom fields UI for WordPress
Stars: ✭ 312 (-3.41%)
Mutual labels:  wordpress
Wp Webpack Script
💥🔥📦👩‍💻 An easy to use, pre configured, hackable webpack setup & development server for WordPress themes and plugins.
Stars: ✭ 314 (-2.79%)
Mutual labels:  wordpress
Wpdotnet Sdk
WordPress compiled to .NET Standard. SDK for ASP.NET Core.
Stars: ✭ 309 (-4.33%)
Mutual labels:  wordpress
Gatsby Woocommerce Themes
⚡ A Gatsby Theme for WooCommerce E-commerce site Gatsby WooCommerce WordPress
Stars: ✭ 306 (-5.26%)
Mutual labels:  wordpress
Wordpress Xmlrpc Brute Force Exploit
Wordpress XMLRPC System Multicall Brute Force Exploit (0day) by 1N3 @ CrowdShield
Stars: ✭ 315 (-2.48%)
Mutual labels:  wordpress
Graphql Wp
GraphQL endpoint for WordPress
Stars: ✭ 303 (-6.19%)
Mutual labels:  wordpress
Woocommerce Pos
🏪 A simple front-end for taking WooCommerce orders at the Point of Sale.
Stars: ✭ 318 (-1.55%)
Mutual labels:  wordpress
Wordpress Ios
WordPress for iOS - Official repository
Stars: ✭ 3,239 (+902.79%)
Mutual labels:  wordpress
Corcel
Use WordPress backend with Laravel or any PHP application
Stars: ✭ 3,504 (+984.83%)
Mutual labels:  wordpress
Awps
A Modern WordPress Starter Theme for savvy Developers
Stars: ✭ 319 (-1.24%)
Mutual labels:  wordpress
Uix Kit
A free UI toolkit based on some common libraries for building beautiful responsive website, compatible with Bootstrap v4.
Stars: ✭ 318 (-1.55%)
Mutual labels:  wordpress
Vuefront
VueFront Core. Turn your old-fashioned CMS website in to a SPA & PWA in 5 minutes
Stars: ✭ 316 (-2.17%)
Mutual labels:  wordpress

PostTypes v2.1

Build Status Latest Stable Version Total Downloads License

Simple WordPress custom post types.

Requirements

Installation

Install with composer

Run the following in your terminal to install PostTypes with Composer.

$ composer require jjgrainger/posttypes

PostTypes uses PSR-4 autoloading and can be used with the Composer's autoloader. Below is a basic example of getting started, though your setup may be different depending on how you are using Composer.

require __DIR__ . '/vendor/autoload.php';

use PostTypes\PostType;

$books = new PostType('book');

$books->register();

See Composer's basic usage guide for details on working with Composer and autoloading.

Basic Usage

Below is a basic example of setting up a simple book post type with a genre taxonomy. For more information, check out the online documentation here.

// Require the Composer autoloader.
require __DIR__ . '/vendor/autoload.php';

// Import PostTypes.
use PostTypes\PostType;

// Create a book post type.
$books = new PostType( 'book' );

// Attach the genre taxonomy (which is created below).
$books->taxonomy( 'genre' );

// Hide the date and author columns.
$books->columns()->hide( [ 'date', 'author' ] );

// Set the Books menu icon.
$books->icon( 'dashicons-book-alt' );

// Register the post type to WordPress.
$books->register();

// Create a genre taxonomy.
$genres = new Taxonomy( 'genre' );

// Set options for the taxonomy.
$genres->options( [
    'hierarchical' => false,
] );

// Register the taxonomy to WordPress.
$genres->register();

Notes

Author

Joe Grainger

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].