• Hello,

    I’ve created a custom post type of “blog” using the following:

    add_action( 'init', 'create_post_type' );
    function create_post_type() {
    	register_post_type( 'blog',
    		array(
    		'labels' => array(
    			'name' => __( 'Blogs' ),
    			'singular_name' => __( 'Blog' )
    			),
    		'public' => true,
    		'has_archive' => true,
    		'supports' => array(
    			'title',
    			'editor',
    			'excerpt',
    			'thumbnail',
    			'revisions'
    			),
    		'menu_position' => 20,
    		'taxonomies' => array('category', 'post_tag')
    		)
    	);
    }

    Now the problem lies with getting this to display in my files.

    I have single.php and single-blog.php but still when navigating to the page i receieve a “Page not found”… So for some reason it’s not using either of my templates. The same for the archive.php and archive-blog.php.

    I can use Query posts to get to the date – but obviously I need to be able to navigate to http://mysite.com/blog/…

    Any help appreciated.

    Aaron

The topic ‘Custom Post Types & Templating’ is closed to new replies.