If you are simply registering a custom post type called ‘services” then your register code should look like
register_post_type( ‘services’, $args );
Make sure the word “services” is exact in register_post_type. And
Your post_type word should be max. 20 characters, can not contain capital letters or spaces
Also make sure your has_archive parameter is set true like this
‘has_archive’ => true,
And don’t forget to flush the rewrite rule by clicking save in permalink setting in your backend after any change in the slug or permalink.Hope this helps you
Related Posts:
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- Custom Post Type with Nested Taxonomy and Template Files
- Archive or taxonomy pages not working for custom post type
- Trying to manage templates on a blog with lots of custom taxonomies
- Custom post type and taxonomy permalinks – Structure
- Custom Taxonomy term archive template
- Custom post type templating problem
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- WordPress Doesn’t Generate Taxonomy Archive
- Getting custom taxonomy posts on archive page
- Archive page of taxonomy returns a 404 error
- Specific template for subcategory of custom taxomy
- taxonomy – templates are not loading
- Templates for CPT not working
- Single taxonomy for different custom post types
- List a custom taxonomy’s terms, with links, on the taxonomy page
- Custom taxonomy meta fields
- How to Add Custom Taxonomy To Woocommerce Plugin
- How to get the posts of a custom taxonomy term
- How can I rewrite URLs to pass taxonomy and post type values to the query?
- Custom taxonomy not showing up when adding a new custom post type
- query multiple taxonomies
- wp_set_object_terms() is not replacing term, but creating a new one
- Custom Post Type Permalink For Parent/Child, 404 Page Not Found Error
- Create an archive page for custom taxonomies
- remove support for ‘Categories’ for a custom post type
- How to check if last uri segment is a custom post type or taxonomy term?
- Categories under custom post types doesn’t show properly
- Hide child term posts on parent term pages
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- get a list of posts from Custom Taxonomy
- Want to filter only parent post in admin area
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Display custom taxonomy as dropdown list
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Query to change custom post type with specific category
- Best action hook to create custom post and assign taxonomy terms to it on plugin activation?
- Custom Post Type and Custom Taxonomy Permalinks
- How many Custom Post Types to register?
- Insert HTML inside link in a walker
- How to bulk copy custom fields between custom posts?
- get_attached_media() on author page not working
- CPT UI change custom taxonomy url
- Custom post type structure for posts with multiple child posts
- Search / Filter posts on Title/Content OR Tags
- Show posts from two or more custom taxonomy terms
- Hide parent categories when clicked, and show it’s childs
- Custom taxonomy and custom post type – wrong permalinks and template
- Auto Complete Search
- Custom taxonomy returns 404
- Displaying Custom Taxonomies From Multiple Custom Post Types
- Display and register custom categories for custom post types
- Properly flush rewrite rules on plugin activation
- Adding predefined terms to a taxonomy
- Loop to display custom post type from a custom Taxonomy
- Redirect to archive is single post has a certain term assigned to it?
- Custom query – get_the_terms not work
- portfolio custom type tags support
- Custom taxonomies to define versions of a product
- How to select a template for a custom post type?
- Targeting custom post type via functions.php doesn’t work
- Custom taxonomy not saving correctly
- prevent sub categories to show up
- Custom post type category link redirecting to 404 page
- Custom post type and multi taxonomies + customize url
- Archive page URL for custom taxonomy and post type
- Custom Post Type Archive Page showing as 404
- Custom taxonomy terms hierarchical navigation
- Is it possible to add the Gutenberg block editor to a custom taxonomy?
- What is the best way to structure posts for the same event happening in different years?
- Dynamically Adding Posts of Post Type to A List
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Show parent category and subcategory once in while loop
- I cannot display custom posts in custom taxonomy
- How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name [duplicate]
- Custom taxonomy with custom post type template not showing
- Loop to display parent categories in custom taxonomy
- One-Time Script TimeOut for Large Data
- CPT Efficient way to display posts from different categories with custom query
- Associate custom categories to different user IDs
- How to create default taxonomy term for a custom post type? [duplicate]
- Extensive search filtering and results->PDF in the front-end
- archive-{custom_post_type}.php not getting recognized wordpress
- How to retrieve the permalink for a specific (custom) term?
- Values inside a custom field to determine which category posts to display
- Taxonomy and Rewrite Structure
- Pagination for a Custom Taxonomy
- Trying to create hierarchy between 3-4 custom post types
- title tag for custom post type remove taxonomy name from title tag
- Create a page selector using taxonomies
- Advanced search form with filters for custom taxonomies and custom fields
- Only One Post of Custom Post Type Appearing on Template Page
- Code to show related posts (custom post type and custom taxonomy/category) is messing with other code
- register_term_meta not working
- Rewrite Rule for custom post type link with or without taxonomy terms
- How to add to taxonomies to a post type
- Filtering custom post types using category taxonomy
- How to use wp_set_object_terms depending on page ID?