Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

WAS Social Custom Post Type

// Register Custom Post Type
function social_custom_post_type() {

	$labels = array(
		'name'                => _x( 'Social Media Posts', 'Post Type General Name', 'text_domain' ),
		'singular_name'       => _x( 'Social Media Post', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'           => __( 'Social Media Posts', 'text_domain' ),
		'parent_item_colon'   => __( 'Parent Social Media Post:', 'text_domain' ),
		'all_items'           => __( 'All Social Media Posts', 'text_domain' ),
		'view_item'           => __( 'View Social Media Post', 'text_domain' ),
		'add_new_item'        => __( 'Add New Social Media Post', 'text_domain' ),
		'add_new'             => __( 'Add New Social Media Post', 'text_domain' ),
		'edit_item'           => __( 'Edit Social Media Post', 'text_domain' ),
		'update_item'         => __( 'Update Social Media Post', 'text_domain' ),
		'search_items'        => __( 'Search Social Media Post', 'text_domain' ),
		'not_found'           => __( 'Not found social media posts', 'text_domain' ),
		'not_found_in_trash'  => __( 'Not found social media posts in Trash', 'text_domain' ),
	);
	$args = array(
		'label'               => __( 'social_media_posts', 'text_domain' ),
		'description'         => __( 'Each post has a piece of content pulled from one of WAS social media pages', 'text_domain' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'thumbnail', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
		'taxonomies'          => array( 'category', 'post_tag' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 5,
		'menu_icon'           => ' true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capability_type'     => 'page',
	);
	register_post_type( 'social_media_posts', $args );

}

// Hook into the 'init' action
add_action( 'init', 'social_custom_post_type', 0 );