When you register the custom post type you need to include has_archive
set to the slug where you want the archive. You also need rewrite
set to the slug prefix. It’s probably easier to understand the code rather than my wording of it:
Your code should look something like this now:
register_post_type('conference',
...
'public' => true,
);
You need to update it to:
register_post_type('conference',
...
'public' => true,
'has_archive' => 'conference',
'rewrite' => array('slug' => 'conference'),
);
You may need to use unregister_post_type
first, to clear it out, and then re-register with your updated function. After the new version is registered, visit your permalinks page to update permalinks, and you should then have both an archive at myurl.co/conference and individual posts at urls like myurl.co/conference/program-item-slug.
Related Posts:
- Hook for post and page load
- How can I add dropdown widget/box to admin post page?
- Custom Posts on Different Pages
- Include images from pages in wp search.php results in default wp search
- Display “Post 2 of 4” on single post page?
- Limit Authors to their Own Posts on front-end excluding admins
- Making pages also serve as taxonomies? Or give full pages to taxonomies?
- I am having a problem with form updating/editing WordPress post on the frontend
- WP_Query is printing out only one post when posts_per_page is set to multiple
- Trying to edit the single page from a Custom Post
- Blog page showing same content as homepage
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Page vs Custom Post Types Differences/Issues
- If post has custom field then display css-class
- I would like to have different styles for my posts based on the content of each post
- Allow non-logged in users to see a future post after clicking on a list of future posts
- No Permission to add new Page, Post or CPT with Admin role
- Including link to custom post type in ‘wp_list_pages’ function
- Multiple pages per post (not pagination)
- Can I change my post type to anything and my site still work?
- Display an authors post on a single page only when they are logged in
- How to add new post using a form to categories when categories are using as menu
- Different post title, keywords and description
- Render a Post or Page using the correct file
- Template code to split a post and print a custom field?
- Am I mixing up the concept of posts pages and categories?
- How to setup different permlalinks for posts and pages?
- Sets post_parent in custom post type posts automatically based on cpt->page name
- Does “Custom Post Type” can have page hierarhy option?
- redirect after submiting post for review
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Is it possible to get the specific content on the search page?
- Why is my custom post content only viewable when signed into WordPress?
- How to change Elementor Template for Single Page Post on Load
- open custom post type in popup window instead of page
- WordPress – display relationship between blog posts and custom posts
- How to use posts as tabs in a custom page?
- wp_post_delete is deleting all offices
- Do not show child pages within a file page
- Disable Sidebar on certain pages
- Cannot save pages after migration
- News post with multiple permalinks? When opened from different page
- Custom Post By Category
- How to get the posts that my following users are liked?
- Include images from pages in wp search.php results in default wp search
- WordPress Contents Migration
- One Post with different content, depending on a Page
- Featured image in custom post is being disabled
- Why isn’t my custom post type using the corresponding custom post template?
- Cannot use pages created on WP
- Different post types arranged on one page
- How to display data with pagaination on backend?
- How to Associate Posts with Pages
- Why are my wp urls showing page not found?
- How to hide home title on pages and posts?
- How do I hide single category post on my post page
- How can I remove the “Add New” button in my custom post type?
- Submit post and upload image from front-end
- TV Show database – Best way for structuring it?
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- How to let custom post type posts show in standard post archive (like in homepage)?
- Rewrite custom post & taxonomy to share same URL path
- Custom Post Type Name Causing Problem
- Print number of post (in reverse)
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- get_template_part for custom post type content not working
- count_many_users_posts except current logged in user?
- Find the user who initially created the post
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- What’s the difference between same wp functions get_posts(); functions in different form?
- how to check if custom post type column already exists?
- Can I list a custom post type within another custom post type in the admin area?
- List custom taxonomy specific to one custom post type
- Add custom post type settings to wordress default posts
- Side effects of Script and Iframe in post
- Some posts from custom post type to subdomains
- Assigning a category to a custom post type in WordPress
- Automatically add images to a menu
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- Stores category posts in an array
- WordPress: Custom User Role cannot access Custom Post Type | “Sorry, you are not allowed to access this page”
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- how to get options to choose post format in add new post
- Use post in multiple places on a page with multiple posts
- Making a form for user to add new custom post with custom taxonomies and custom fields
- How can I increase the post count for custom post types only?
- How can I check if a post with a particular slug or title exists?
- when looping through custom post data not appearing
- Getting a Post ID to show its content in a Popup
- Get queried object for custom post type count
- edit.php all post not working
- How can I get the last 5 element of this tax query?
- How can i order my posts by post type?
- How to mark posts as visited
- Show tags of custom post types in WordPress
- wordpress form processing to custom post type not working
- WordPress custom field images not getting inserted into array
- Display all post types together
- Issue displaying multiple TinyMCE editors with WPAlchemy
- Sort ACF by custom taxonomy