Last active
September 7, 2016 23:54
-
-
Save wichaksono/aa6a55cf51b76d815dcd51855bdad575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* tutorial membuat semi toko online | |
* @package https://www.onphpid.com/category/membuat-semi-toko-online | |
* @see : https://www.onphpid.com/langkah-awal-membuat-semi-toko-online-dengan-wordpress.html | |
*/ | |
function onphpid_post_type() | |
{ | |
// add post-type | |
register_post_type( | |
'onphpid_products', | |
array( | |
'labels' => array( | |
'name' => __('Products', 'semi-toko-online'), | |
'singular_name' => __('Product', 'semi-toko-online'), | |
'add_new' => _x( 'Add New', 'product', 'semi-toko-online' ), | |
'add_new_item' => __( 'Add New Product', 'semi-toko-online' ), | |
'new_item' => __( 'New Product', 'semi-toko-online' ), | |
'edit_item' => __( 'Edit Product', 'semi-toko-online' ), | |
'view_item' => __( 'View Product', 'semi-toko-online' ), | |
'all_items' => __( 'All Products', 'semi-toko-online' ), | |
), | |
'public' => true, | |
'supports' => array('title', 'editor', 'thumbnail'), | |
'has_archive' => true, | |
'rewrite' => array('slug'=>'product'), | |
'menu_position' => 100, | |
'menu_icon' => 'dashicons-cart' | |
) | |
); | |
} | |
add_action('init', 'onphpid_post_type'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment