I think you need to use the rewrite argument.
Here’s an example setting the url to tips
$args = array(
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'tips' ), // Here!
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => 20,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'revisions', 'custom-fields')
);
register_post_type( 'tips', $args );
More info: http://codex.wordpress.org/Function_Reference/register_post_type
Related Posts:
- Permalinks: custom post type -> custom taxonomy -> post
- Mixing custom post type and taxonomy rewrite structures?
- Resolve a custom post type name vs. page permalink conflict (same slug)
- How to rewrite URI of custom post type?
- How to change permalink structure for custom post type and it’s taxonomies?
- Change permalinks for posts but not for custom post types
- Custom post types – Use post_id in permalink structure
- Custom post type permalink: only use %post_id% and remove %postname%
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- Rewrite custom post type rss feed links
- 404 on child page when parent page slug is identical to custom post type
- rewrite get parameter with custom post type
- Remove unwanted part of permalink custom structure from CPT url?
- Custom permalinks – post type – hierarchical taxonomy’s
- Changing a custom post type “has_archive” after registered
- dynamically update permalink and title with the values of custom fileds
- Change permalink structure for custom post type
- Custom post types and permalinks : What a mess !
- Custom Post Type slug same as page name causing a conflict
- Custom Post Type “Event” with custom permalink structure
- WordPress rewrite my URL when i use pagination
- Custom Taxonomy breaking pages permalinks
- Permalinks without post type
- Custom post types and permalinks
- How to remove custom post type name from base url?
- Custom post type – how can I make it a sub-url of another page?
- Custom fields in Permalinks?
- Change URL of posts and also Custom Post Type
- Custom post type permalinks
- Use different taxonomies in different custom post types’ permalinks?
- post_type_link not working in gutenberg
- Custom template won’t load for a custom post type (custom permalinks used)
- How can I update the permalink everywhere for a custom post type?
- How to hook custom taxonomies to custom post types and make the permalinks work?
- custom post type parsed as attachment
- Help with Elementor Pagination CPT archive 404 problem
- How to have the same url structure for both a CPT and a Taxonomy?
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- Can’t remove front from permalinks for custom taxonomy category page
- Using taxonomy term in CPT permalink – Pages 404’s
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Blog posts for custom post type only
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom post type archive pagination 404
- Custom post type, permalinks, taxonomies and blog posts
- Custom post type permalink returns 404
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- 404 in custom post type feed with mistake permalink
- Add a permalink variable onto custom post type URL after post name slug
- How to solve this custom post type goes to 404 page?
- How to query 2 custom post types that need to share a slug?
- How to change path for default WordPress blog posts?
- Custom post type as child of page
- How to implement a different permalink structure for custom post type?
- Custom Post Type permalink without /%day%/ and/or /%postname%/
- WordPress custom permalink and archive link for custom post type
- Enabling permalinks disables custom page template
- Need to return a string as permalink insted of str_replace
- Under What Conditions Can I name my CPT the same as my CPT Page?
- Custom post type category permalinks and archive pages
- One Custom Post Type two different Templates
- Adding /blog in front of single posts (only)
- How to remove /blog/ prefix for custom post types in permalinks?
- On saving Post My permalink is updated and category is removed automatically which cause the 404
- Searching in multiple category + URL hierarchy in real estate WordPress site
- Custom post ID & display information related to this ID
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Edit the default ‘post’ custom post type arguments
- add all blog posts to folder
- Category permalinks don’t work even after flushing
- Changing permalink of default Post with custom post
- Custom Taxonomy Archive generates 404
- Enabling hierarchical in a Custom Post Type gives error 404
- Standard Page Child of CPT Not Found (404)
- How to create a permalink structure with custom taxonomies and custom post types
- Permalinks change when edit published post on custom post type
- Custom permalink rewrite rules – how do I fix this?
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- How to retrieve custom post type permalink in another cpt?
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Post Custom & Taxonomy 404 error
- Same permalink structure for all post types?
- the_permalink() leads back to homepage
- Custom post type with parent page? Possible?
- Hierarchical taxonomy in permalink structure
- Can’t make permalink of CPT work
- Issue with permalinks for custom post type
- Cross post type parent page added parent page to permalink but give 404
- Category / Custom Post Type permalink issue
- Adding rewrite rules to Custom Post-type mixed with Taxonomy
- “regular” pages not found after changing permalink
- Custom Post Type and Taxonomy pagination permalink
- permalink structure for single-{post-type}.php in wordpress
- Linking from a list of custom post type items to a single – get_post_permalink not working correctly
- Custom post type permalink structure
- How do I use CPT and permalinks with a mobile theme?
- Can I have a specific template for products even if they are standard posts and not CPT?
- How to add custom permalink struct with DYNAMIC author to a Custom Post Type
- Custom post type Premalinks main page and details page
- Permalinks for Custom Post Types and Taxonomies