Home Forums WordPress Plugins Hide My WP Hide custom post type in urls?

This topic is: resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #602
    Gotrekk
    Post count: 2

    hi everyone,

    is it possible to hide custom post slug in url?
    i have a custom post type called “project” and i’d like to change in something like:

    from http://www.website.com/project/projectalpha to http://www.website.com/tutorial/projectalpha
    or even http://www.website.com/projectalpha

    thanks in advance

    #608
    Hassan
    Post count: 955

    Sorry for delay,

    No it’s not possible by HMWP. But if you search in your theme (or related plugin) files you should find something like below:

    function create_posttype() {
    	register_post_type( 'acme_product',
    		array(
    			'labels' => array(
    				'name' => __( 'Products' ),
    				'singular_name' => __( 'Product' )
    			),
    			'public' => true,
    			'has_archive' => true,
    			'rewrite' => array('slug' => 'products'),
    		)
    	);
    }

    Just change slug to what you want. Read more here:
    http://codex.wordpress.org/Post_Types

    #609
    Gotrekk
    Post count: 2

    thanks a lot 😀 sorted it out!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.