Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter rombaaa

    (@rombaaa)

    Thank you for the answer.
    We’ll then wait for the proper certificate and see if it fixes the issue.

    It displays location on the other side of the globe – and interesting thing is, it shows for me (EU location) the same location in the USA in IE and Safari.

    Thread Starter rombaaa

    (@rombaaa)

    Thank you for a fast reply. Unfortunately, this doesn’t work. The js is enqueued and no testing alert msg appears.

    Thread Starter rombaaa

    (@rombaaa)

    We need to get the ID within the template. There is a code which uses <% =id %> as the store id (class or id of an element). We can’t save this into a variable and call it within the template. This id will be used to get store info of a given field and grab the field value using get_post_field(…$storeid….).

    The template is in out child theme.

    For each location, we want to add some content saved in a post. Because the content is large and uses jquery tabs, etc. it is not possible to add it simply to the large description field.

    Thank you.

    Thread Starter rombaaa

    (@rombaaa)

    Hello Tijmen,

    thank you for the update. I’ve tried it and still no results – I’ve the max results drop down unchecked ??

    I’m using is_page_template instead of the is_page. I’m printing also the template name, to check that the correct the code runs, but somehow the args are not taken into account.
    I’ve added $wpsl_settings[‘max_results’]=’1′ as well, but neither this change the number of results.

    To be more precise, I’m not allowing (denying) location on my browser to test the number of result, just in case the plugin somehow depends on it.

    Any idea, why it is not working?

    Thank you and happy new year!

    Thread Starter rombaaa

    (@rombaaa)

    Thank you for reply, Tijmen.
    I tried changing only $wpsl_settings within the template (or in the functions.php as shown below), unfortunately this didn’t work. I tried changing wpsl_js_settings, but the same – anyway, isn’t it needed just for the map? We’re not loading any map, just the listing of locations and we need only one – the closest to the user. This should be send on every page.

    Any help would be appreciated.

    Here is the code in the functions.php.

    add_filter( ‘wpsl_templates’, ‘custom_templates’ );
    function custom_templates( $templates ) {
    $templates[] = array (
    ‘id’ => ‘custom’,
    ‘name’ => ‘Custom template’,
    ‘path’ => get_stylesheet_directory() . ‘/’ . ‘wpsl-templates/custom.php’,
    );
    return $templates;
    }

    add_filter( ‘wpsl_listing_template’, ‘custom_listing_template’ );
    function custom_listing_template() {
    global $wpsl_settings;
    // $wpsl_settings[‘max_results’]=’1′;
    $listing_template = ‘<li data-store-id=”<%= id %>”>’ . “\r\n”;
    $listing_template .= “\t\t\t” . ‘“>YOUR K1 SPEED<br />’ . “\r\n”;
    $listing_template .= “\t\t\t\t” . wpsl_store_header_template( ‘listing’ ) . “\r\n”;
    $listing_template .= “\t\t\t” . ‘
    ‘ . “\r\n”;
    $listing_template .= “\t” . ‘‘ . “\r\n”;
    return $listing_template;
    }

    Same for me. Not sure if tmwr though.

Viewing 6 replies - 1 through 6 (of 6 total)