Hello @jaimbateman,
Sure. By default, GEO my WP uses template files when populating the list of results. The files for the “Responsive-1” template, for example, can be found in geo-my-wp/plugins/posts-locator/templates/search-results/responsive-1. Inside this folder there is the file named single-result.php that outputs the content of each item/post in the list of results.
Now, one way to customize the list of results is by created a custom template folder, place it in the child theme of your site, and then edit those files as you wish.
Another way to customize it is using the hook you mentioned. You can write a custom function that will basically replace the single-results.php file with your custom data.
The script below contains the exact data from the single-results.php file from the “Responsive-1” template. You can test it on your site by placing the script in the functions.php file of your theme or using a Snippet plugin. Then go to GEO my WP form editor ( edit the form you created ), select the “Responsive-1” search results template, and under the “Styling” section check the “Disable Single Item Template” checkbox.
Testing your form now in the front-end of your site you shouldn’t see any difference in the list of results. However, once you edit the function below by adding or removing data from it, you should then see those changes take place in your front-end form.
This way you can modify the list of results by adding custom data or removing data that is not needed in the list of results ( It does require some basic PHP/HTML knowledge ).
I hope this helps.
Let me know if you have any questions or issues.
function gmw_custom_search_results_single_item_template( $post, $gmw ) {
?>
<div id="gmw-single-post-<?php echo absint( $post->ID ); ?>" class="<?php gmw_object_class( $post, $gmw ); ?>">
<div class="gmw-item-inner">
<?php do_action( 'gmw_search_results_loop_item_start', $post, $gmw ); ?>
<div class="gmw-item-header">
<?php gmw_search_results_featured_image( $post, $gmw ); ?>
</div>
<div class="gmw-item-content">
<?php gmw_search_results_distance( $post, $gmw ); ?>
<h3 class="gmw-item gmw-item-title">
<?php gmw_search_results_linked_title( get_permalink(), get_the_title(), $post, $gmw ); ?>
<?php gmw_search_results_address( $post, $gmw ); ?>
</h3>
<?php do_action( 'gmw_search_results_loop_content_start', $post, $gmw ); ?>
<?php gmw_search_results_post_excerpt( $post, $gmw ); ?>
<?php gmw_search_results_meta_fields( $post, $gmw ); ?>
<?php gmw_search_results_location_meta( $post, $gmw ); ?>
<?php gmw_search_results_hours_of_operation( $post, $gmw ); ?>
<?php gmw_search_results_taxonomies( $post, $gmw ); ?>
<?php gmw_search_results_directions_link( $post, $gmw ); ?>
<?php do_action( 'gmw_search_results_loop_content_end', $post, $gmw ); ?>
</div>
<div class="gmw-item-footer">
<?php gmw_search_results_address( $post, $gmw ); ?>
</div>
<?php do_action( 'gmw_search_results_loop_item_end', $post, $gmw ); ?>
</div>
</div>
<?php
}
add_action( 'gmw_search_results_single_item_template', 'gmw_custom_search_results_single_item_template', 50, 2 );