How can I display only post titles in the WordPress search results?

Should I edit my WordPress theme’s search.php file or is there a function I could add to only display my post titles in the search results.

The Swiftype WordPress plugin does not change how your search results look on your search results page. That rendering behavior is typically controlled by your active theme.

For most themes, editing the search.php file to modify how they are displayed will do the trick.