How to Creating custom post Type in WordPress
This code use for you can create a custom post type and this code add your function.php
file WordPress.
WordPress custom post types are powerful features. They’re what elevates WordPress from a humble blogging tool to a CMS.
<?php function create_service_post_type() { register_post_type( 'service', array( 'labels' => array( 'name' => 'Service', 'singular_name' => 'Cafe', 'add_new' => 'Add New', 'add_new_item' => 'Add New service', 'edit_item' => 'Edit service', 'new_item' => 'New service', 'view_item' => 'View service', 'search_items' => 'Search service', 'not_found' => 'Nothing Found', 'not_found_in_trash' => 'Nothing found in the Trash', 'parent_item_colon' => '' ), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, //'menu_icon' => get_stylesheet_directory_uri() . '/yourimage.png', 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title','editor','thumbnail') ) ); } add_action( 'init', 'create_service_post_type' );
Author: Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.
Trending Posts
Tags
ACF
Ading custom columns
admin
Bootstrap
Cart Price
categories
Change Price
class
Code
comments
Create
Creating custom post Type
CSS
current
custom
Customizing
Custom Post
Custom Post Type
Custom Taxonomy
database
Date
Fatch
form
function
HTML
Image
Install
javascript
jQuery
Menu
PHP
Post
Post Type
Price
product
responsive
Resular price
Single product
Table
taxonomy
Theme
Title
woocommerce
Wordpress
Wordpress Code