It would be something like this (goes in functions.php
or elsewhere, but not template):
add_action( 'pre_get_posts', 'include_dictionnaire_in_home' );
function include_dictionnaire_in_home( $query ) {
if ( ! is_admin() && $query->is_main_query() && $query->is_home() ) {
$query->set( 'post_type', array( 'post', 'dictionnaire' ) );
}
}
Note that index.php
template is not strictly home template. It is catch-all template that is used if no better hierarchy match is available. It’s just common for home because more specific template is rarely provided for it.