Include Custom Posts Type in Year/Month/Date Archive

Your code simply adds post types to the query when on the author archive so to do the same with date archive simply replace is_author to is_date : function custom_post_date_archive($query) { if ($query->is_date) $query->set( ‘post_type’, array(‘wp_plugin_review’, ‘png_gallery’, ‘post’, ‘news’) ); remove_action( ‘pre_get_posts’, ‘custom_post_author_archive’ ); } add_action(‘pre_get_posts’, ‘custom_post_date_archive’);

Recent comments on author page?

This function calls all comments by an author and strips every comment to a max-length. Adjust the comment excerpt length when calling the function in your template like wpse19316_author_comments( 100 );. function wpse19316_author_comments( $length ) { $final_length = (int) $length; $author_comments = get_comments( array( ‘ID’ => $GLOBALS[‘authordata’]->ID ) ); foreach ( $author_comments as $comment ) … Read more

disable /feed/ for custom post type

If you dive into how this works, you end up at set_props. At the bottom of that function you see that setting rewrite’ => array(‘feeds’ => false) will be interpreted as ‘no rewriting’, meaning the default will be used. Also, if you have not set the has_archive argument WP will not know what to fill … Read more

Permalink Structure problem with cpt and custom taxonomy

Welcome to WP StackExchange! You may want to try something like this, which uses the same rewrite setting as your register CPT: $args = array( ‘rewrite’ => array(‘slug’ => ‘events/ecat’, ‘with_front’ => false) ); register_taxonomy( ‘ecat’, array( ‘events’ ), $args ); Sources: https://cnpagency.com/blog/the-right-way-to-do-wordpress-custom-taxonomy-rewrites/ https://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments