/**
* Register a custom post type called “Portfolio”.
*/
function create_portfolio_post_type() {
$labels = array(
‘name’ => _x( ‘Portfolio’, ‘Post type general name’, ‘textdomain’ ),
‘singular_name’ => _x( ‘Portfolio Item’, ‘Post type singular name’, ‘textdomain’ ),
‘menu_name’ => _x( ‘Portfolio’, ‘Admin Menu text’, ‘textdomain’ ),
‘name_admin_bar’ => _x( ‘Portfolio Item’, ‘Add New on Toolbar’, ‘textdomain’ ),
‘add_new’ => __( ‘Add New’, ‘textdomain’ ),
‘add_new_item’ => __( ‘Add New Portfolio Item’, ‘textdomain’ ),
‘new_item’ => __( ‘New Portfolio Item’, ‘textdomain’ ),
‘edit_item’ => __( ‘Edit Portfolio Item’, ‘textdomain’ ),
‘view_item’ => __( ‘View Portfolio Item’, ‘textdomain’ ),
‘all_items’ => __( ‘All Portfolio Items’, ‘textdomain’ ),
‘search_items’ => __( ‘Search Portfolio Items’, ‘textdomain’ ),
‘parent_item_colon’ => __( ‘Parent Portfolio Items:’, ‘textdomain’ ),
‘not_found’ => __( ‘No portfolio items found.’, ‘textdomain’ ),
‘not_found_in_trash’ => __( ‘No portfolio items found in Trash.’, ‘textdomain’ ),
‘featured_image’ => _x( ‘Portfolio Item Cover Image’, ‘Overrides the “Featured Image” phrase for this post type. Added in 4.3’, ‘textdomain’ ),
‘set_featured_image’ => _x( ‘Set cover image’, ‘Overrides the “Set featured image” phrase for this post type. Added in 4.3’, ‘textdomain’ ),
‘remove_featured_image’ => _x( ‘Remove cover image’, ‘Overrides the “Remove featured image” phrase for this post type. Added in 4.3’, ‘textdomain’ ),
‘use_featured_image’ => _x( ‘Use as cover image’, ‘Overrides the “Use as featured image” phrase for this post type. Added in 4.3’, ‘textdomain’ ),
);

$args = array(
‘labels’ => $labels,
‘public’ => true,
‘publicly_queryable’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,
‘query_var’ => true,
‘rewrite’ => array( ‘slug’ => ‘portfolio’ ), // This is your portfolio URL slug
‘capability_type’ => ‘post’,
‘has_archive’ => true,
‘hierarchical’ => false,
‘menu_position’ => 5, // 5 = below Posts
‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘excerpt’ ),
‘menu_icon’ => ‘dashicons-format-gallery’, // Find more icons here: https://developer.wordpress.org/resource/dashicons/
);

register_post_type( ‘portfolio’, $args );
}
add_action( ‘init’, ‘create_portfolio_post_type’ );

One response to “”

  1. A WordPress Commenter Avatar

    Hi, this is a comment.
    To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
    Commenter avatars come from Gravatar.

Leave a Reply

Your email address will not be published. Required fields are marked *



Dream country

Paradise city

Rainbow road 555.

info@example.com

sale@example.com

mail@example.com

+55 5555 555

+55 5555 555

+55 5555 555