When you declare the custom post type, there is a parameter “rewrite” where you declare the slug for the post type. Change the slug to “media/videos”, and then visit your Settings > Permalinks page to update your rewrite rules.
register_post_type( 'videos',
array('labels' => array(),
'rewrite' => array( 'slug' => 'media/videos', 'with_front' => false )
)
);
Related Posts:
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- How to set parent-child relationship between differents custom post types
- Integrating a custom post type into a page hierarchy
- Nested custom post types with permalinks
- Change custom post type to hierarchical after being registered
- Display a list of child posts on parent posts of a custom post type
- Custom Post Type as Page parent
- How to handle a hierarchy with custom post types
- Can I have Post Types under other Post Types in Admin menu?
- set a CPT as parent of a page
- Custom routes for custom post type?
- Hierachical Custom post types permalinks not working
- Child pages on hierarchical Custom Post Types 404s
- Custom Post Type ‘hierarchical’ Help!
- How to check if last uri segment is a custom post type or taxonomy term?
- Custom permalinks – post type – hierarchical taxonomy’s
- How to show term-specific post list, without posts associated with child terms?
- how do i create a specific handler for a url?
- URL Design for Sub-Posts?
- How to query for posts (in hierarchical custom post type) that have children?
- Getting taxonomy terms used by custom post type
- Custom Taxonomies: Multiple Hierarchical Permailnks For A Single Post + Prev/Next Links
- custom post type index page
- Hierarchical or Non-hierarchical Custom Post Type in Real World Example
- Detect if 1st, 2nd or 3rd level custom page?
- Parent / Child formatting in a list of post of a custom post type
- Child page in custom post throws 404 page not found
- Show hierarchical relationship between to custom post types on admin list
- How to Combine Two Custom Post Types into Single Permalink Structure
- Custom Posts Hierarchy? (State/City/Restaurant)
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Automatically populate a hierarchical taxonomy from a custom field
- Hierarchical Custom Posts – Highlighting Current Post in Sub-Menu
- Multiple templates for a custom post type
- Remove base slug in permalinks of hierarchical custom post type
- Modifying Custom Post Type after registration (will it affect content?)
- Twenty Fifteen: Adjacent posts by menu_order [duplicate]
- Display custom post type in hierarchical order with get_terms
- Should I use custom taxonomy or custom post type
- post_row_actions not working for hierarchical post type
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- Hierarchical Custom Post Types in Array
- WordPress Custom Post Type Children Template
- Use a hierarchical custom post type for a main blog and subblogs?
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types
- Need help with permalink rewrites for Custom Post Types with hierarchical relationships
- Rewrites/query for multiple hierarchical custom post types
- Custom while loop for hierarchical display of a taxonomy
- Get the taxonomy of a post hierarchically
- Custom Post Types hierarchy and rewrite
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- Hierarchial Custom Post Types/Taxonomies
- Hierarchical permalinks for custom post type and taxonomy
- using wp_update_post for updating custom post type
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Is it safe to change a Custom Post Type from “hierarchical:false” to “hierarchical:true”?
- Custom post type as child of page
- get parent content inside child posts
- Templates for hierarchical custom post type
- custom hierarchical taxonomy and custom post type list contains surplus posts
- How to query for posts (hierarchical custom post type) that have children but are NOT top level?
- Migrating Hierarchal Taxonomy Categories Between Post Types
- Ideas on how to organize a project [closed]
- Add search to ‘Parent’ dropdown
- How should I structure complex content hierarchies?
- Query all post types but limit to parents
- List child categories from parent category on custom taxonomy page
- Custom post type hierarchical loop in Homepage
- How to implement very unusual wordpress routing structure?
- How to set a ‘page’ as parent of a custom post type?
- Permalink with hierarchy of Custom Post Types
- Setting Custom Post Type Parents/Hierarchies
- Custom taxonomy terms hierarchical navigation
- Having hierarchies inside WordPress custom post type
- How to convert hierarchical Pages to hierarchical Custom Post Types? Slugs get a number as if they were duplicates
- wp_get_nav_menu_items doesn’t return custom post type item
- Custom Post Type parent/child relationship rewrite rules for permalinks
- Attempting to get number of grandchildren of page in WP_Query loop
- Add specific route for Custom Post Type (add/edit…)
- hierarchical Custom post type child permalink not found
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Display posts of a hierarchical custom post type excluding parent posts
- Group based routing and administration
- Most efficient way of showing children posts?
- Hierarchical Custom Post Type Walker?
- Display a Custom Post Type within another with hierarchically slug
- Redirect sub-page URLs to parent without changing URL
- Custom Post Hierarchy and users
- taxonomy term names in custom post type permalink structure
- Custom Post Type Child Pages
- Cross post type parent page added parent page to permalink but give 404
- General question about Parent and Child Post type relationships
- Hierarchy between post types
- Specifying Default Template for Hierarchal Custom Post Type [duplicate]
- Rewriting hierarchical post type
- Hierarchical Custom Post Types
- How do I assign the post parent?
- How to add a regular page under a custom post type?