Does this happen for you in a different browser as well, also in private mode?
The more info link works for me after making a search, but none of the ones I clicked on show an email / website or phone. Does it show anywhere for you in Dutch or French?
Thread Starter
pjdc
(@pjdc)
Hello Tijmen,
Indeed, the info was probably still showing because of the cache.
Now it works like you say, the box opens, but no extra info (mail, website phone) is inside.
I have used the text-editor for this info (mail, site, phone), not the fields of the plugin.
The fact that this info does not show anymore is probably because i updated WordPress and the function was deleted.
Could you please remind me how to add the function to show the text-editor info in the map-box? I added this function and was working before the WordPress update, but i forgot how…
Thanks!
This article explains how to include the extra data in the search results itself, but instead of using the wpsl_listing_template filter mentioned in the article, you have to use the wpsl_info_window_template filter.
You can access the data with <%= email %>, <%= url %> and <%= formatPhoneNumber( phone ) %> if you want to include them in the template code.
The code itself goes in the functions.php inside your active theme folder. Do flush the WPSL transient cache, you can do this on the WPSL settings page ( tools section ) before reloading the store locator page.
Thread Starter
pjdc
(@pjdc)
Ok, so updating the theme was the problem…
Thanks for helping me out!
I got everything back up and running!
For anyone looking for the code to add the description to the map-box:
add_filter( 'wpsl_info_window_template', 'custom_info_window_template' );
function custom_info_window_template() {
$info_window_template = '<div data-store-id="<%= id %>" class="wpsl-info-window">' . "\r\n";
$info_window_template .= "\t\t" . '<p>' . "\r\n";
$info_window_template .= "\t\t\t" . wpsl_store_header_template() . "\r\n";
$info_window_template .= "\t\t\t" . '<span><%= address %></span>' . "\r\n";
$info_window_template .= "\t\t\t" . '<% if ( address2 ) { %>' . "\r\n";
$info_window_template .= "\t\t\t" . '<span><%= address2 %></span>' . "\r\n";
$info_window_template .= "\t\t\t" . '<% } %>' . "\r\n";
$info_window_template .= "\t\t\t" . '<span>' . wpsl_address_format_placeholders() . '</span>' . "\r\n";
$info_window_template .= "\t\t" . '</p>' . "\r\n";
$info_window_template .= "\t\t" . '<% if ( description ) { %>' . "\r\n";
$info_window_template .= "\t\t" . '<%= description %>' . "\r\n";
$info_window_template .= "\t\t" . '<% } %>' . "\r\n";
$info_window_template .= "\t\t" . '<%= createInfoWindowActions( id ) %>' . "\r\n";
$info_window_template .= "\t" . '</div>' . "\r\n";
return $info_window_template;
}
add_filter( 'wpsl_include_post_content', '__return_true' );
?>