Custom Post Types not working
-
I have added some code to my functions file and uploaded it to my server, and I can now see the appropriate post type in my left hand bar in the admin area, and I’m able to add posts to it – but I’m unable to view them!
When I click them I get my 404 page, but the URL looks correct.
Here is the code I’ve been using:
//custom post type add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'test_product', array( 'labels' => array( 'name' => __( 'Test' ), 'singular_name' => __( 'Test' ) ), 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'test'), ) ); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom Post Types not working’ is closed to new replies.