I think you are correct, that editing the search results template will give you the output you want. If you’re willing to try some trial and error coding, you could pull this off yourself because you are only removing output, not changing or adding code. You can safely remove code by turning parts of it into a comment. Doing so could cause syntax errors when the correct parts are not completely commented out. Learning a few basic syntax rules should prevent much of this.
You should first create a child theme so your custom template is safe from theme updates. There’s no real coding involved in this part. You need to be able to create a plain text file and upload it to a new folder on your server.
Open a copy of search.php in a local text editor. Don’t use the built in WP theme editor, it’s dangerous because it makes no backups. When you are done with this file, upload it to your child theme folder, do not replace the original file! Look for “The Loop” on the template file. It usually starts with while ( have_posts() ) : the_post();
and ends with endwhile;
. Each theme has its own variations of repeatedly doing something to comprise the loop. while: endwhile;
is most common, but you may see something like while ( have_posts() ) { a bunch of code to execute }
over several text lines.
If the code inside the loop includes get_template_part()
, you’ll need to locate what template part file gets loaded and copy that into the child. If it comes from a sub-folder, replicate the same structure in your child.
What you are really looking for is things like the_title(), the_author(), the_category(), etc. that output undesirable output. You will make these into comments. If you comment out the wrong thing or create a syntax error, just undo your last edit. This means working in small increments and checking your work frequently. Keep backups once in a while in case you need to revert. The only thing you really want in the loop is either the_content() or the_excerpt().
In PHP, every code “line” ends with a semicolon;. This code line may span many lines of text. To avoid syntax errors, you should generally only comment out entire code lines. Comments are created by adding /*
at the beginning and */
at the end. You may see another comment style that starts with //
. It ends at the end of the text line (not code line) without any other special character. It’s the invisible line feed that terminates this style.
You’ll see other syntax that involves {curly braces}. If you comment out the beginning of one of these, be sure the matching closing brace} is also commented. It’s safer to leave these alone and comment out code lines within the braces.
All PHP code occurs inside of <?php ?> tags. Anything outside of this is plain HTML. <!– HTML comments look like this –>. Browsers are tolerant of bad HTML, so correct syntax is less of an issue. Try not to corrupt the HTML syntax if you can.
A lot of explanation here, but you’ll find execution isn’t nearly as bad as it sounds here. It’s well worth learning a little PHP because it’s very empowering to be able to tweak you site’s output exactly the way you want. You might even find it’s rewarding and even kind of fun ??
About the 2500 relatives. I think there is a plugin that imports Excel files. Whether the data ends up the way you need it, I don’t know. For someone that can code, importing CSV data into posts is easily done by automated custom code. It may be a bit much for a novice, but a pro can whip up something fairly quickly. They can quickly fix up your search template too. You can find such help a jobs.wordpress.net.