• Hi all,

    I am wondering if its possible to give different markers to each category. So Marker #1 for category #1 and marker #2 for category #2 to differentiate two types of stores I want to show.

    The second question is about how to display a link underneath the result that guides people to the /name-of-the-particular-store subpage. Show a “More info” link in the store listings? has been activated, but the details link shows only up when I choose “in the info window on the map” (“Where do you want to show the “More info” details?”). Is it possible to highlight this link also within the info window?

    1) Show the detail store link underneath the result in the Link (which is currently not working)
    2) Show the detail store link in the info window above the “route planning” link?

    This is what we have: https://www.kito.net/niederlassungen/

    Thanks for any help, really appreciate your great plugin!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tijmen Smit


    How to use different category markers is described here.

    You can customize the search results template with this filter.

    Copy the code from the usage section and place it in the functions.php inside your active theme folder.

    Replace line 31 – 33 with this to show the link ( this assumes you have enabled the permalink option ).

    $listing_template .= "\t\t\t" . '<% if ( permalink ) { %>' . "\r\n";
    $listing_template .= "\t\t\t" . '<p><a href="<%= permalink %>">Link<a/></p>' . "\r\n";
    $listing_template .= "\t\t\t" . '<% } %>' . "\r\n";

    If you want to show custom data in the info window, then you have to use this filter instead.

    • This reply was modified 6 years, 4 months ago by Tijmen Smit.
    Thread Starter Foxhounds


    Hello Tim, thanks for your reply! Really appreciate it!

    I placed the following code into my class-frontend.php but for my category ID “743” the image does not change to the desirable image. What did I wrong?

    add_filter( 'wpsl_cpt_info_window_meta_fields', 'custom_cpt_info_window_meta_fields', 10, 2 );
    function custom_cpt_info_window_meta_fields( $meta_fields, $store_id ) {
        $terms = wp_get_post_terms( $store_id, '743' );
        if ( $terms ) {
            if ( !is_wp_error( $terms ) ) {
                if ( function_exists( 'z_taxonomy_image_url' ) ) {
                    $meta_fields['https://www.kito.net/wp-content/uploads/2018/02/kito_pin_black@2.png'] = z_taxonomy_image_url( $terms[0]->term_id );
        return $meta_fields;
    Thread Starter Foxhounds


    Regarding the permalink, this worked perfectly! Is there a chance to also modify this functions.php code to show each of the languages I’m using with WPML and also show the permalink in the info window on the map?

    Best wishes!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘2 questions regarding customization’ is closed to new replies.