Do not use flush_rewrite_rules()
on every init
, use it in your plugin’s activation hook once (example).
Side note: __('New Video')
is broken. Without the second parameter textdomain
this text is not translatable. Use __( 'New Video', 'your_plugin_textdomain' )
instead.
Related Posts:
- Getting hierarchical custom post type permalinks to work just like pages
- Custom post type 404s with rewriting even after resetting permalinks
- 404 on child page when parent page slug is identical to custom post type
- Hierachical Custom post types permalinks not working
- Remove Slug from Custom Post Type results in 404
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- custom post type and custom taxonomy url conflict
- Bizarre Permalinks Issue: 404 Errors Everywhere
- Custom taxonomy in URL showing 404
- Help with Elementor Pagination CPT archive 404 problem
- Using taxonomy term in CPT permalink – Pages 404’s
- Parent Page and Breadcrumb URL’s for Custom Post Types Not Working
- Custom post type archive pagination 404
- Custom post type permalink tag 404
- Hierarchical permalinks for custom post type and taxonomy
- 404 in custom post type feed with mistake permalink
- How to solve this custom post type goes to 404 page?
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- One Custom post type 404’s others don’t
- Custom post type permalink returns 404 when set to private
- Custom post type slug 404
- How to filter a custom post type by custom taxonomy without 404
- Post type Permalink
- Permalinks not working (404) for the ‘item’ post type
- Safe to throw 404 error in request filter?
- Custom Post Type Child Won’t Come Through With Pretty Permalinks
- Custom post shows 404 after theme change
- How can I get custom post types to recognize pretty permalink variables?
- Enabling hierarchical in a Custom Post Type gives error 404
- Standard Page Child of CPT Not Found (404)
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Custom Post Type, 404 error
- Custom Post Type Permalink / Rewrite not working immediately
- How to remove /blog/ prefix for custom post types in permalinks?
- WordPress Custom Post Type is Matching on Partial Slug
- Change slug of registered custom post type in child theme
- Templates for Custom Post Types and Custom Taxonomies
- How to disable a Custom Post Type Feed?
- Custom permalinks
- Permalink for CPT with taxonomy
- Custom post type permalink changing itself every other change
- Add links to post categories and taxonomies in wysiwyg link modal?
- Custom Post Type Works but Still Shows “Page Not Found”
- WordPress custom post type category pagination 404 Error
- Custom Permalinks for Custom Post Types and Taxonomies
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Custom post type category, taxonomy and URL rewrite problem
- Rewrite on custom post type permalink not working?
- Custom Post Type: How to display all of same taxonomy?
- Custom post type permalink missing /post_type/ front
- Remove “-2” from a Toolset Types URL with the same post name
- custom post type default permalink
- Permalinks not working for custom taxonomy on custom post type
- Custom Post Type permalink shows wrong page: homepage/index.php
- Get term name and term parent into custom post type permalink
- Does WordPress consider a post name unique if that same post name is in multiple Post Types?
- Custom post type as home page with custom url
- Custom post URL 404 error
- URL rewrite add author as base
- Single post with a Custom Post Type returns 404, when archives of the CPT work correctly
- WordPress randomly shows 404 errors
- CPT’s with landing page instead of archive – Url Rewrite?
- Custom Post Type – Duplicate Page Slugs
- Custom post type pagination 404
- Remove permalink for custom post type
- How to have permalink like domain.com/term/postname?
- how to retain the ability to modify the post slug after applying a post_type_link filter?
- Pagination of custom post type leads to 404 error
- Custom permalink structure for remote content pages
- WordPress Custom URLs
- Adding an extra parameter [string] to my posts’ permalink?
- Custom Post Type nest under a normal WordPress Page
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- Problem with custom loop navigation inside the blog page
- Error 404 change permalink term custom term taxonomy
- WordPress URL rewrites using Advanced Custom Field
- Preview url not working outside wp-admin
- Sudden 404 pages on product category archives
- Custom post type defaults to index.php for archive page
- Adding categories to custom post type in permalink
- Custom Post Type slug and WPML gets 404 error
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- Pretty permalink structure with multiple (AND OR) taxonomies
- 404 custom post type
- Custom post URLs
- Custom Post Type Archive Links Not Working
- Custom Post Type Categories Not Maintaining URL structure any more
- CPT unsaved draft gives error 404 – when Post Formats support enabled
- Add category slug as class attribute in a link array
- Get post id of permalink for a specific custom post type?
- URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php
- Add taxonomy to custom post type archive
- Custom Post Type – Rewrite slug [duplicate]
- Custom post type – permalink
- How do I paginate a custom post type listing on a custom template page?
- Custom post types permalinks not working
- Rewrite rules for using the same base slug for multiple content types
- How to add custom permalink struct with DYNAMIC author to a Custom Post Type
- Custom post type Premalinks main page and details page