wp_get_archive() does not work natively with custom post type, even if the official documentation let suppose it’s possible to use CPT as argument ( https://codex.wordpress.org/Template_Tags/wp_get_archives)
post_type
(“string”) Limit archives to a post type. Default is ‘post’. (since Version 4.4)
You can find discussion and possible workaround in this stackoverflow post: https://stackoverflow.com/questions/8943251/wp-get-archives-for-custom-post-type-not-working
and here: Custom Post Type Archives by Year & Month?
Please note also that in your CPT register_post_type()
args you should always set public to “true” to have a public accessible url
Related Posts:
- Custom Post Type Archives by Year & Month?
- Date archives for custom post type
- Display all custom post types in archives.php
- custom post types, wp_get_archives and add_rewrite_rule
- Extend the wp_get_archives output with ‘?post_type=foo’?
- just can’t get date-based archives per post-type to work
- get the custom post type title/name
- Get an array of the number of post per year of a custom post type (WordPress)
- Yearly Archive from a custom date metabox (Event Start Date)
- wp_get_archives(); Change output of link
- Remove slug from custom post type post URLs
- How to sort the admin area of a WordPress custom post type by a custom field
- How to rename default posts-type Posts
- How to create a custom post type without letting WordPress assign a URL
- Custom Post Types, or completely custom?
- How can I include custom post types on a tag page?
- has_term or in_category for Custom Post Types
- Posts to expire (deleted) after a date
- Removing Edit Permalink/View “Custom Post Type” areas
- Custom Post Type Rewrite Rule for Author & Paging?
- How to display category information from a custom post
- Unable to save custom taxonomy terms in a custom-built metabox
- Custom Post Type: Set post_title equal to a custom post type field
- Rename the insert button in media upload window
- custom sortable column
- Custom Post Types Not acknowledged for date.php template
- How to embed form data within the ‘Add new post’
- Using shortcodes to parse POST request (containing the data from a front-end form)
- Getting a custom post type image using ‘get_post_custom’
- What is the impact if i ignore title and content in my custom post types CPT?
- Get the ID after WP_Query
- how to interconnect custom post types?
- Custom Post Type / Tab Limit
- How to noindex nofollow custom post type?
- Shortcode doesn’t display in custom post type
- How to add custom post types to normal category pages
- How to create custom boxes with text inside?
- Linking to the most recent post in a Custom Post Type
- Custom Post Type permalink shows wrong page: homepage/index.php
- using $wpdb to get custom post type with term
- Get term name and term parent into custom post type permalink
- Changing custom type name hides the posts
- I want to create custom post in which user can share files like PDF & DOCx
- Custom post type – use ajax to display sub pages
- Custom post type and taxonomy permalinks
- re-register custom post type with custom capabilities
- Custom Post Type Template Alternative
- Exclude custom taxonomy term posts from custom post loop
- Meta Box on Custom Post Type not saving
- Not Able To Render Single-CustomPostType.php File
- How to change “post_class()” for a custom post type?
- Custom post type menu-icon not showing up
- Using page slug in wp_query
- Meta box values not displaying in Post Edit Screen after save
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- url rewriting for custom post types
- Post type Permalink
- Sort results without WP_QUERY?
- What happens to my older posts if I switch to a child theme?
- Get template part with CPT and Custom Taxonomy conditionals
- Has register_post_type() changed for WordPress 4.0
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Update custom field value
- Query Custom Post by taxonomy multiple categories
- show most viewed posts of last days by link?
- Advanced archive url structure (category, tag and date)
- Setup page template array in a custom post type
- Display future posts in search
- custom post type tag lists and link to post
- Custom taxonomy terms as children of multiple custom post types
- Define a page to show custom post type
- check if current page is a child of a specified top level page
- Display Custom Fields Meta Box on Category, Tags and CPT
- Filter in Custom post type to find the parent post
- I want to show post details based on roles user login
- pricefilter without WooCommerce
- Send email to author of the post when the custom post status changes to published
- Listing all custom posts having a specific taxonomy whatever the terms
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Taxonomy template file not working with a taxonomy that contains a slash
- Custom post type that lets users create a set of posts?
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- Custom Taxonomy page redirecting to 404 page
- Execute code only after user clicks ‘update’ button for CPT being edited
- Problem with type plugin and custom taxonomies
- Delete custom post type metadata without deleting the post in admin area
- Sort by date, then by time
- Can the wp_posts table have the same slug (post_name) in multiple statuses (post_status)?
- get_pages can’t load pages with custom post types
- Prevent author role from editing others posts
- Filter RSS feed for custom post type to events for next 7 days only
- CPT archive as home page
- Pagination always adding “Next” link when results come from Custom Post Type WP_query
- Rich Custom Field for Custom Post type not saving
- Getting (Invalid) when adding custom taxonomy of custom post type link in menu [closed]
- Display custom taxonomy posts of custom post types
- Custom Post type field don’t show in single machine
- Post types disappeared
- Getting ACF relationship field information
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)