In case others are still looking for a solution like this, I just noticed that as of v4.4 the args for wp_get_archives() now accepts post type.
I wouldn’t be surprised if Jack Lenox had a lot to do with it. Either way, looks like you can skip this plugin from here on.
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>I am working on archiving events and would like to archive events by event date and not the published date. I have events as a custom post type and accepting event_date
(custom field) from admin panel. Can you suggest a way in which I can use the meta_query
to return the events post by event_date passed in the URL.
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>Hi there,
i’ve got a few custom post types that I would like to display. Is it possible for this plugin to display an array of custom posts?
I’ve tried this but nothing happened:
<?php $sumEntries = array( ‘post_type’ => array(‘custom_post_1’, ‘custom_post_2’, ‘custom_post_3’, ‘custom_post_4’)); ?>
<?php wp_get_archives_cpt( $sumEntries ); ?>
Any help?
Thanks.
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>The current version of the plugin is adding the custom post type slug to the url if type=postbypost or alpha is used. I temporarily fixed mine by commenting out “. $post_type” in
this section of
if ( $results ) {
foreach ( (array) $results as $result ) {
if ( $result->post_date != '0000-00-00 00:00:00' ) {
$url = get_permalink( $result ) /*. $post_type*/;
if ( $result->post_title ) {
/** This filter is documented in wp-includes/post-template.php */
$text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) );
} else {
$text = $result->ID;
}
$output .= get_archives_link( $url, $text, $args['format'], $args['before'], $args['after'] );
}
}
}
Thank you.
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>Hey, first of all thanks for an awesome plugin!
I’m looking for the same thing as nicolasschabram, i want the permalink structure to be domain.com/custom-post-type/2015/03. Is this possible to change in the plugin file? Just a hint of how this can be done would save my day!!
Thanks,
Johan
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>Hey, I’m pretty new so I’m not sure if there’s something I’m missing but archives for my CPTs break when I use the WPML plugin. ?? I can’t really give you much to work with either because I don’t get any errors at all!
WPML is great and the company I work for has bought it so I can’t really switch it out ??
All I know is that it works fine when I disable WPML. I’ve tried reactivating both plugins separately and also re-saving permalinks. Any tips?
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>Thanks for writing this plugin it works great.
Is it possible to exclude or better yet just include custom taxonomy specific to a defined Custom Post type?
For example: custom type “book”, has custom taxonomy “genres” (“novel”, “tragedy” .etc.) and we want to display Tragedies archive list only on Tragedy page and Novel on Novel page??
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>As this post concerns another issue I started a second topic.
I’m currently trying to build an archive for my custom post type which should consist of a single page per day. Is there a way to use get_day_link() in combination with this plugin in order to generate the links to the individual pages?
Thanks,
Nicolas
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>Hey Jack,
thanks a lot for this plugin! I’ve been searching for hours until I found this. It seems like it’s doing exactly what I need.
I’ve got just one last problem: Is there a way to alter the permalink structure of the archive pages? At the moment it looks something like domain.tld/2014/09/30/custom_post_type/. I’d prefer domain.tld/custom_string/2014/09/30. Is there a way to do this?
Thank you,
Nicolas
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>Are there advances options that I can use? E.g. yearly, monthly or daily archives.
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>The Plugin works great, however, which template is actually used when I click the link? And how can I modify it.
https://www.ads-software.com/plugins/archives-for-custom-post-types/
]]>