Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Student Loan Post Type

// Register Custom Post Type
function create_student_loans() {

	$labels = array(
		'name'                  => _x( 'Student Loans', 'Post Type General Name', 'payfored' ),
		'singular_name'         => _x( 'Student Loan', 'Post Type Singular Name', 'payfored' ),
		'menu_name'             => __( 'Student Loans', 'payfored' ),
		'name_admin_bar'        => __( 'Studen Loans', 'payfored' ),
		'archives'              => __( 'Loan Archives', 'payfored' ),
		'attributes'            => __( 'Item Attributes', 'payfored' ),
		'parent_item_colon'     => __( 'Parent Item:', 'payfored' ),
		'all_items'             => __( 'All Loans', 'payfored' ),
		'add_new_item'          => __( 'Add New Loan', 'payfored' ),
		'add_new'               => __( 'Add New', 'payfored' ),
		'new_item'              => __( 'New Loan', 'payfored' ),
		'edit_item'             => __( 'Edit Loan', 'payfored' ),
		'update_item'           => __( 'Update Loan', 'payfored' ),
		'view_item'             => __( 'View Loan', 'payfored' ),
		'view_items'            => __( 'View Loans', 'payfored' ),
		'search_items'          => __( 'Search Loan', 'payfored' ),
		'not_found'             => __( 'Not found', 'payfored' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'payfored' ),
		'featured_image'        => __( 'Featured Image', 'payfored' ),
		'set_featured_image'    => __( 'Set featured image', 'payfored' ),
		'remove_featured_image' => __( 'Remove featured image', 'payfored' ),
		'use_featured_image'    => __( 'Use as featured image', 'payfored' ),
		'insert_into_item'      => __( 'Insert into Loan', 'payfored' ),
		'uploaded_to_this_item' => __( 'Uploaded to this loan', 'payfored' ),
		'items_list'            => __( 'Loans list', 'payfored' ),
		'items_list_navigation' => __( 'Loans list navigation', 'payfored' ),
		'filter_items_list'     => __( 'Filter loans list', 'payfored' ),
	);
	$args = array(
		'label'                 => __( 'Student Loan', 'payfored' ),
		'description'           => __( 'Post type to display student loan information', 'payfored' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 25,
		'menu_icon'             => 'dashicons-welcome-learn-more',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => false,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => false,
		'capability_type'       => 'page',
		'show_in_rest'          => false,
	);
	register_post_type( 'student_loans', $args );

}
add_action( 'init', 'create_student_loans', 0 );