Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/talentedaamer/oop-custom-post-type
Dynamically Generate Custom Post Types for your WordPress themes with single line of code,
https://github.com/talentedaamer/oop-custom-post-type
Last synced: about 24 hours ago
JSON representation
Dynamically Generate Custom Post Types for your WordPress themes with single line of code,
- Host: GitHub
- URL: https://github.com/talentedaamer/oop-custom-post-type
- Owner: talentedaamer
- Created: 2015-05-16T14:53:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-16T15:54:01.000Z (over 9 years ago)
- Last Synced: 2024-04-18T14:12:14.152Z (7 months ago)
- Language: PHP
- Size: 133 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### OOP-Custom-Post-Type.
-----------------------------
Generate Custom Post Types with a single line of code by extending the class.### Usage.
----------------
Drop the file in your theme inc folder and add it in functions.php
```
require get_template_directory() . '/inc/oop-cpt-generator.php';```
now make new instance of the class and register the post types.```
// features post type
$feature_args = array(
'supports' => array('title', 'editor'),
);
new OOP_CPT_Generator( 'feature', $feature_args );// services post type
$service_args = array(
'supports' => array('title', 'editor'),
);
new OOP_CPT_Generator( 'service', $service_args );// portfolio post type
new OOP_CPT_Generator( 'portfolio' );// testimonial post type
new OOP_CPT_Generator( 'testimonial' );// faq post type
$service_args = array(
'supports' => array('title', 'editor'),
);
new OOP_CPT_Generator( 'faq', $service_args );
```### Authors and Contributors
----------------------------
OOP Post Type Generator is written by Aamer Shahzad @talentedamer a WordPress theme developer on WordPress.org and OOPthemes.com### Support or Contact
----------------------
Please visit [OOPThemes](http://oopthemes.com) support forum if you have any issue regarding the use of OOP Post Type Genertator.