Include the Contact Details in the Search Results

If you would like to include contact details in the search results, you can do this with the wpsl_listing_template filter.

In this example, data from the phone, fax, and email fields are included in the listing template between line 20 and 30:

Place this code in the functions.php in your theme folder, reload the page, and you should see the contact details in the search results.

Contact details

Make the Email Address and Phone Number Clickable

The above code example shows the email address and phone number without any links attached to them. You can easily change this by making a small modification to the code.

Email
Replace the <%= email %> ( line 28 ) with the following code:

Phone Number
Replace the <%= formatPhoneNumber( phone ) %> ( line 22 ) with the following code: