Date archives default to querying just the post
post type, you can add additional post types to those queries via the pre_get_posts
action
function wpa_date_archive_post_types( $query ){
if( $query->is_main_query() && $query->is_date() ):
$query->set( 'post_type', array( 'post', 'your_custom_type' ) );
endif;
}
add_action( 'pre_get_posts', 'wpa_date_archive_post_types' );
Related Posts:
- Resolve a custom post type name vs. page permalink conflict (same slug)
- Custom post type yearly/ monthly archive permalinks
- WordPress Custom Post Type is Matching on Partial Slug
- How do I redirect all 404 errors of a specific post type to another URL?
- How can I fix a slow redirect after form submit from frontend (no plugin)?
- Bulk 301 redirect for custom post type
- How to redirect all pages of a custom post type [duplicate]
- Redirect to post with only post ID in the URL vs post_type/post ID
- How to redirect wp-admin/index.php to a custom post type?
- How to set up htaccess to redirect a particular post type or subdirectory to HTTPS?
- Redirecting when changing custom post type slugs?
- Different permalink for CPT and regular Posts/Pages but why?
- Custom Post Type without an archive page
- Delete link on single-custom.php with redirection
- Redirect page to first post in custom post type
- Custom Taxonomy Permalinks Redirection
- Create/Edit posts and auto-redirect back to listing page
- Custom post type redirected to homepage – how to debug
- 301 redirect for converted post type
- redirecting improperly after updating custom taxonomy term when referring from CPT edit page
- Child post with numeric only slug keeps redirecting to parent
- Redirect 404 page with ID in slug to associated page with same ID in slug
- redirect automatic page that serves custom posttype content
- Redirect custom post type category to other custom post type category
- Can slugs from posts and custom post types conflict?
- Some posts from custom post type to subdomains
- Changed permalink structure of CPT – should I redirect?
- Custom URL redirect in WP
- Redirect to archive is single post has a certain term assigned to it?
- Redirect to first child on Custom Post Type (without template)
- Create short URL with auto 301 redirect
- Check if user has custom post published redirection on WordPress
- Custom Post Type archive redirects to home
- rewriterule not working
- Custom taxonomy permalink without term, redirection to CPT slug
- redirect after submiting post for review
- How best to structure multiple CPTs and tax within a ‘resources’ section
- Redirect Existing Post to CPT
- Faking “Same Slug Root, Multiple Custom Post Types” with Redirects?
- Issues with static pages redirecting towards home.php
- Post Click Redirect to Custom URL instead of Single Post Page
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- Custom Function to redirect singular post if specific meta field is empty
- Custom Post Type canonical link / pagination redirecting to root
- How to redirect custom post type posts to one url with htaccess?
- How to override post-new.php with custom template
- Custom 404 redirect for a luddite
- Redirect users in first login to a dynamic link
- Redirect sub-page URLs to parent without changing URL
- How to develop custom URL redirection
- Redirect Custom Post Type after user submits update
- Redirection error after posting a comment on a custom type post
- Redirect preview single post link to a page
- Redirect permalinks after creating custom post types
- URL Redirection From Custom Type to Posts
- Custom Post Type slug has the same Redirection entry
- Right Permalink for Custom Post Type with number slug
- How to create alias / synonym links to existing posts
- Remove “show sharing buttons” metabox Jetpack from custom post type
- Why is get_pages() returning a boolean?
- Using preg_replace to filter custom textarea
- Show Custom Taxonomy title in loop
- How to update to WordPress 3.6 and not lose my website’s design
- Advanced custom field boolean value in custom post type
- Warning: Invalid argument supplied for foreach() [closed]
- Custom Post Loop pulling all custom posts, not just one
- Add ‘last’ class to second post in featured post loop
- Custom post type isn’t working
- How can I add a filter to a particular post format?
- Single page not working for custom post type
- Settings API – save multiple tabs at once
- WP the_posts() on single-cars.php get category link
- Add additional field to custom post_type
- Is it possible to filter the display name for post formats for display in the Formats meta box?
- Conditional for a Single Post That Belongs to a Category?
- tax_query not working in template
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- What content types are shown at a search page?
- cannot override post_types in WP_Query()
- Wrapping x posts in html without leaving empty html
- How to hook one custom post-types post to another?
- Can NOT search my custom post type?
- Page not found for custom post type UI plugin and taxonomy
- Can a shortcode included in post content add styles to the ?
- $post not working working in AJAX plugin with custom post type
- Category.php template for custom posts
- How to Get the title of a custom field?
- Limiting posts_join, where, etc to a specific WP_Query object?
- How can I display custom post types on a page?
- Remove permalink for custom post type
- Trick to get custom post types to show up on a custom taxonomy page?
- Custom Post Meta from custom metaboxes is randomly being deleted
- Is there any way to get list of all possible filter hooks for all post types?
- Error function query
- Show post with thumbnails only
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters
- How to add custom taxonomy in custom post type permalink?
- Custom post type archive with page as parent url
- WP Query post__in not returning correct results