Skip to content

leonmagee/WordPress-CPT-Function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Create Custom Post Type

Usage ( put in functions.php )
/**
 * Create New Custom Post Types
 * Use 'init' action hook
 */
 include_once( 'directory/mm_create_wp_cpt.php' );

 function mm_register_post_types() {

 	mm_create_wp_cpt::create_post_type( 'testimonials', 'Testimonial', 'Testimonials', 'testimonials', 'format-quote' );

 	mm_create_wp_cpt::create_post_type( 'press-release', 'Press Release', 'Press Releases', 'press-release', 'rss' );
 }

 add_action( 'init', 'mm_register_post_types' );
Icons

A Complete list of icons is available here:

https://developer.wordpress.org/resource/dashicons

About

A function for creating custom post types - used in functions.php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages