- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I am trying to create Custom post types. Everything appears in the Admin correctly but when I view the CPT I get “Page not found”.
Am I leaving out a step?
http://devprideandpolish.randallreillycms.com/profile/bill-smith/
This is all I added…
function driver_profiles() {
$labels = array(
‘name’ => _x( ‘Profiles’, ‘post type general name’ ),
‘singular_name’ => _x( ‘Profile’, ‘post type singular name’ ),
‘add_new’ => _x( ‘Add New’, ‘book’ ),
‘add_new_item’ => __( ‘Add New Profile’ ),
‘edit_item’ => __( ‘Edit Profile’ ),
‘new_item’ => __( ‘New Profile’ ),
‘all_items’ => __( ‘All Profile’ ),
‘view_item’ => __( ‘View Profile’ ),
‘search_items’ => __( ‘Search Profile’ ),
‘not_found’ => __( ‘No profiles found’ ),
‘not_found_in_trash’ => __( ‘No profiles found in the Trash’ ),
‘parent_item_colon’ => ”,
‘menu_name’ => ‘Driver Profiles’
);
$args = array(
‘labels’ => $labels,
‘description’ => ‘Pride and Polish Trucks and Drivers’,
‘public’ => true,
‘menu_position’ => 5,
‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘excerpt’, ‘comments’ ),
‘has_archive’ => true,
);
register_post_type( ‘profile’, $args );
}
add_action( ‘init’, ‘driver_profiles’ );
You may have to “refresh” your permalink settings after creating them. Change them, save, then change them back to what they should be, save again.
If everything else is OK, that should make it work.
That got it, thanks again!