hi Leo thanks for the link, that code worked.
For any others who like to know I modified the code there so it would show into both home and date archive:
function add_custom_post_type_to_query( $query ) {
if ( ! is_admin() && $query->is_main_query() ) {
if ( $query->is_date() || $query->is_home() ) {
$query->set( 'post_type', array('post', 'pictures') );
}
}
}
add_action( 'pre_get_posts', 'add_custom_post_type_to_query' );
People generally don’t want CPTs showing up in the default WordPress post loops – which is why they create CPTs.
I see. I could use my default posts easily enough instead of a CPT but I want to add custom fields to the edit screen and also customize the template and then these would show up in every post I made when I don’t need them. I thought as well as clutter it could cause other issues.
thanks,