You can turn the store thumbnail into a link with help from the wpsl_listing_template filter.
This code example assumes you enabled the permalink option .
If the permalink option is disabled, and you want the thumbnail to link to the url from the “Additional Information” tab, then replace <%= permalink %>
with <%= url %>
on line 9.
add_filter( 'wpsl_listing_template', 'custom_listing_template' );
function custom_listing_template() {
global $wpsl_settings;
$listing_template = '<li data-store-id="<%= id %>">' . "\r\n";
$listing_template .= "\t\t" . '<div>' . "\r\n";
$listing_template .= "\t\t\t" . '<p><a href="<%= permalink %>"><%= thumb %></a>' . "\r\n";
$listing_template .= "\t\t\t\t" . wpsl_store_header_template( 'listing' ) . "\r\n"; // Check which header format we use
$listing_template .= "\t\t\t\t" . '<span class="wpsl-street"><%= address %></span>' . "\r\n";
$listing_template .= "\t\t\t\t" . '<% if ( address2 ) { %>' . "\r\n";
$listing_template .= "\t\t\t\t" . '<span class="wpsl-street"><%= address2 %></span>' . "\r\n";
$listing_template .= "\t\t\t\t" . '<% } %>' . "\r\n";
$listing_template .= "\t\t\t\t" . '<span>' . wpsl_address_format_placeholders() . '</span>' . "\r\n"; // Use the correct address format
$listing_template .= "\t\t\t\t" . '<span class="wpsl-country"><%= country %></span>' . "\r\n";
$listing_template .= "\t\t\t" . '</p>' . "\r\n";
$listing_template .= "\t\t\t" . wpsl_more_info_template() . "\r\n"; // Check if we need to show the 'More Info' link and info
$listing_template .= "\t\t" . '</div>' . "\r\n";
if ( !$wpsl_settings['hide_distance'] ) {
$listing_template .= "\t\t" . '<%= distance %> ' . esc_html( $wpsl_settings['distance_unit'] ) . '' . "\r\n";
}
$listing_template .= "\t\t" . '<%= createDirectionUrl() %>' . "\r\n";
$listing_template .= "\t" . '</li>';
return $listing_template;
}