Skip to main content
1 of 2
Robert hue
  • 8.5k
  • 2
  • 34
  • 50

Try adding this to your functions.php.

function my_custom_get_posts( $query ) {
  if ( is_admin() || ! $query->is_main_query() )
    return;

  if ( $query->is_search ) {
    $query->set( 'post_type', array( 'post', 'movie' ) );
  }

}
add_action( 'pre_get_posts', 'my_custom_get_posts', 1 );

Also make sure you do not have any other pre_get_posts action overwriting this function's effect.

Robert hue
  • 8.5k
  • 2
  • 34
  • 50