For post formats, change template slug from content- to format-
For post types, change template slug from content- to type-
In search check if is post and display format template or display post type template