Custom Post Types and Categories
-
Hi,
I am newbie in WP and it would be nice if someone guide me to an issue i am facing.
I have create a custom post type (books) and i have assigned it to a category (education). I have register post type in functions.php and when i type https://localhost/testwp/books wordpress gets every post for books but when i type https://localhost/testwp/book/education i get the “Oops! That page can’t be found”. I think i have to create a php page but i can’t figure out which page.
Thank you in advance
add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'deals', array( 'labels' => array( 'name' => __( 'Deals' ), 'singular_name' => __( 'Deal' ) ), 'public' => true, 'has_archive' => true, ) );
}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Post Types and Categories’ is closed to new replies.