Forums

Custom Post Type override calling archive (1 post)

  1. the14thgod
    Member
    Posted 1 year ago #

    I'm brand new to wordpress and hacking my way at this with the help of a friend. He's unavailable today and am looking for some help.

    I created a custom post type:

    register_post_type( 'njl_profiles',
    		array(
    			'labels' => array(
    				'name' => __( 'Profiles' ),
    				'singular_name' => __( 'Profile' )
    			),
    		'public' => true,
    		'has_archive' => true,
    		'rewrite' => array('slug' => 'people'),
    		'taxonomies' => array('category')
    		)
    	);

    Now I want mydomain.com/people/ to NOT be an archive page and can't seem to get it to not be an archive page. There will not be an archive at all for this. mydomain.com/people/ will be a search/filter page while mydomain.com/people/justin should be a profile page.

    I've done some research and it looks like prior to 3.1 this was the case, but in 3.1 the slug is now the archive.

    How can I override this? I can't seem to formulate the right google query to get this answered. (I've tried: has_archive = false, changed slug to profile, and still no luck).

    Thanks for any and all help,
    Sorry for the noob WP question, I've avoided WP like the plague but this site has to be WP (client request).
    Justin

Topic Closed

This topic has been closed to new replies.

About this Topic