Forum Replies Created

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

    (@ekta91)

    One more Thing description is not showing how can i show it.?

    Thread Starter ekta91

    (@ekta91)

    I have did like:

    $metas = $wpdb->get_results($wpdb->prepare(“SELECT post_id FROM $wpdb->postmeta where meta_value='”.$_REQUEST[‘area’].”‘ and meta_key = ‘wpsl_state'”));
    foreach($metas as $meta)
    {

    ?>
    <div class=”map”>
    <?php
    echo do_shortcode(‘[wpsl_address id=”‘.$meta->post_id.'” name=”true” address=”true” address2=”false”
    city=”true” state=”false” zip=”true” country=”true” phone=”true”
    fax=”false” email=”true” url=”true”]’);
    //echo do_shortcode(‘[wpsl template=”default” start_location=”‘.$_REQUEST[‘area’].'”]’);
    echo do_shortcode(‘[wpsl_map id=”‘.$meta->post_id.'” width=”86%” height=”250″ zoom=”5″ map_type=”roadmap”
    map_type_control=”true” map_style=”default” street_view=”false”
    scrollwheel=”true” control_position=”left”]’);
    ?></div>
    <?php
    }

    Thread Starter ekta91

    (@ekta91)

    Okay Thank you.

    Thread Starter ekta91

    (@ekta91)

    I dont have any category I want to distinguish provider on the basis of there location.

    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><%= thumb %>’ . “\r\n”;
    $listing_template .= “\t\t\t\t” . wpsl_store_header_template( ‘listing’ ) . “
    \r\n”;
    $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”;
    $listing_template .= “\t\t\t\t” . ‘<span class=”wpsl-country”><%= country %></span>’ . “\r\n”;
    $listing_template .= “\t\t\t\t” . ‘<span class=”wpsl-phone”><%= phone %></span>’ . “
    \r\n”;
    $listing_template .= “\t\t\t\t” . ‘<span class=”wpsl-email”><%= email %></span>’ . “
    \r\n”;
    $listing_template .= “\t\t\t\t” . ‘<span class=”wpsl-url”>“><%= url %></span>‘ . “
    \r\n”;
    $listing_template .= “\t\t\t” . ‘</p>’ . “\r\n”;
    // Check if the ‘appointment_url’ contains data before including it.
    //$listing_template .= “\t\t\t” . ‘<% if ( appointment_url ) { %>’ . “\r\n”;
    $listing_template .= “\t\t\t” . ‘<p><%= description %></p>’ . “\r\n”;
    // $listing_template .= “\t\t\t” . ‘<% } %>’ . “\r\n”;

    $listing_template .= “\t\t” . ‘</div>’ . “\r\n”;

    // Check if we need to show the distance.
    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” . ” . “\r\n”;

    return $listing_template;
    }

    use <?php do_shortcode(‘[wpsl]’);?> if you want to use it in your template page.I dont know how you can directly add it to your template

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