add_filter( 'post_type_link', 'filterslash_post_type_link', 11, 2);
function filterslash_post_type_link( $post_link, $post ){
$post_link = home_url("/$post->post_name/");
return $post_link;
}
Related Posts:
- Taxonomy page returns 404 page not found
- Prepend meta_value to permalink of post
- Removing CPT slug from URL results in 404 error for archive page
- Getting Post ID from slug during init
- Interesting Custom Post Type Slug with Taxonomy and Custom Field
- Rewrite rules for custom post type slug
- How to remove slugs from multiple custom post types
- Change custom post type slug from plugin options
- Rewrite post type slug only for child theme
- Custom rewrite url category
- Index page with the same id as the slug
- How can I make the slug of the taxonomy also the slug of the custom post
- Programmatically rewriting slug through functions.php but returns 404
- Including taxonomy term before post type breaks top level pages
- WordPress Custom Post Type – Rewrite Query
- Custom Post Type Advanced Slug
- Custom Post Types and Removing Slugs – should we do it?
- Custom rewrite rule based on other custom post type title
- Custom Post Type not using correct page template
- Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?
- Two CPT: one is using part of the custom rewrite slug from the other
- Custom Post Type with multiple Custom Taxonomies / Hide Taxonomy Slug from URL
- Custom post type Premalinks main page and details page
- Custom slugs with dates & IDs on Custom Post Type
- Add post id to url instead of WordPress default -2 suffix
- Custom post type yearly/ monthly archive permalinks
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- How can I rewrite URLs to pass taxonomy and post type values to the query?
- Using Custom Fields in Custom Post Type URL
- Removing base slug from hierarchical custom post type
- Rewriting ‘rewrite’ slug for custom post type used by plugin
- Adding meta values to permalink
- WordPress custom taxonomy URL rewrite on spelling errors
- How can i avoid the permalink start with ‘blog’ while using the custom post type?
- Custom Posttype Inheritance (and url structure)
- Adding %author% in custom post type URL structure?
- Post slug changed using code doesn’t reflect on editor when post is published
- Defining a default page for custom post type
- Pass parameter to custom post type single while keeping clean url
- Reslug a Custom Post Type
- Many to Many Taxonomies or rewrite rules?
- remove post-name from title in custom post type
- Rewrite custom post & taxonomy to share same URL path
- Custom post type’s slug gets wrong when adding a custom meta box
- Adding a date archive to Custom Post Type
- Bulk 301 redirect for custom post type
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Custom Post Type and Custom Taxonomy Permalinks
- Pagination problem
- Custom post type with slug for plural (archive) and for single
- Custom Post Type Post have a Child `Page` Post Type Post
- remove permalink “front part” for custom post type
- Query var removed after rewrite
- Change Permalink Structure for Tag.php template
- Custom post types archive redirect
- Remove post type slug of all post types from permalinks
- Add archive slug to default post post type
- Custom Post type and permalink settings
- Permalink for a custom post type isn’t working and I don’t know why
- Assign same parrent Page to pages AND custom post types
- Versioned Custom Post Type (Not the same as revisions)
- Custom post Type, child of a Page?
- Hide or disallow default custom post type url?
- Multiple (two) category postings on the same page.
- Custom taxonomy returns 404
- Pretty URLs and custom post types
- Specific routing for CPT
- Lost of query parameter when using permalink
- Slug for custom post type
- Custom Rewrite Rule for Custom Post Type with URL Param
- WordPress custom slug rewrite
- Dynamic CPT permalink structure based on ACF field value
- Rewrite rules for custom post type
- Custom taxonomy and post type rewrite rules
- Custom Post Type and Taxonomy Rewrite Error
- custom posts permalinks url rewriting
- Url Rewriting a dynamic wordpress page with parameters
- I want to rewrite the URL of a specific post with a specific custom field to easily analyze in Google Analytics
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- Display CPT taxonomies as an archive page
- CPTUI rewrite disable when no post in CPTUI has been found
- Set archive of custom post type like ‘posts’ page in reading settings is set
- Change permalink incrementor into pseudo-subdirectory
- Register post type getting error 404
- WP gives 404 error for custom post type with GET variable
- CPT url rewriting : regular posts return 404 error
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- One custom post type with two different url structure base on taxonomy term
- Costum post type with costum (sub)taxonomy
- Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks
- Ideal top-level slug methods
- How can you preserve URLs when moving posts to a custom post type?
- Custom Post Type Base URL
- Custom Post Type and single-posttype template
- Create page using same slug as custom post type
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- How to rewrite custom slugs that follow my rules
- What is the best way to relate different custom post types?
- Allow child pages with the same base as the CPT slug
- Custom Post Type slug has the same Redirection entry