Custom Post Type Archives by Year & Month?

Yes, you can. All you need is make a filter for wp_get_archives(); so it accepts post_type parameter: function my_custom_post_type_archive_where($where,$args){ $post_type = isset($args[‘post_type’]) ? $args[‘post_type’] : ‘post’; $where = “WHERE post_type=”$post_type” AND post_status=”publish””; return $where; } then call this: add_filter( ‘getarchives_where’,’my_custom_post_type_archive_where’,10,2); Whenever you want to display archive by custom post type, just pass the post_type args: … Read more

Sort results by name & asc order on Archive.php

The easiest way to do this is to use a hook (the pre_get_posts hook) to change the order. But you should check that the query is one for which you do want to alter the order! (is_archive() or is_post_type_archive() should be sufficient.) For instance, put the following in your theme’s functions.php… add_action( ‘pre_get_posts’, ‘my_change_sort_order’); function … Read more

Remove “Category:”, “Tag:”, “Author:” from the_archive_title

You can extend the get_the_archive_title filter which I’ve mentioned in this answer add_filter(‘get_the_archive_title’, function ($title) { if (is_category()) { $title = single_cat_title(”, false); } elseif (is_tag()) { $title = single_tag_title(”, false); } elseif (is_author()) { $title=”<span class=”vcard”>” . get_the_author() . ‘</span>’; } elseif (is_tax()) { //for custom post types $title = sprintf(__(‘%1$s’), single_term_title(”, false)); } … Read more