• #wpsl-stores, #wpsl-direction-details, #wpsl-gmap {
        height: 350px !important;
    }

    Hello, prompt please how to correctly change the height of the output block list of stores (only the list of stores #wpsl-stores). If I change in the settings, the height of all the blocks specified in the code above, thank you

    • This topic was modified 6 years, 3 months ago by bioweb.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Which template are you using ( you can see this on the settings page )?

    Thread Starter bioweb

    (@bioweb)

    Thank you for you quick answer, I have a custom template in my setting page and this code in my functions.php

    // Подключение кастомного шаблона страницы Найти центр
    
    add_filter( 'wpsl_templates', 'custom_templates' );
    
    function custom_templates( $templates ) {
    
        // *
        //  * The 'id' is for internal use and must be unique ( since 2.0 ).
        //  * The 'name' is used in the template dropdown on the settings page.
        //  * The 'path' points to the location of the custom template,
        //  * in this case the folder of your active theme.
         
        $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, $wpsl_settings;
        
        $listing_template = '<li data-store-id="<%= id %>" class="col-6 col-md-3">' . "\r\n";
        $listing_template .= "\t\t" . '<div class="wpsl-store-location card listing-card my-4">' . "\r\n";
        $listing_template .= "\t\t\t" . '<%= thumb %>' . "\r\n";
        $listing_template .= "\t\t\t\t" . wpsl_store_header_template( 'listing' ) . "\r\n"; // Check which header format we use
        $listing_template .= "\t\t\t\t" . '<ul class="list-group list-group-flush">' . "\r\n";
        $listing_template .= "\t\t\t\t\t" . '<li class="list-group-item"><%= address %>' . ", " . wpsl_address_format_placeholders() . '</li>' . "\r\n";
    
        if ( !$wpsl_settings['hide_country'] ) {
            $listing_template .= "\t\t\t\t" . '<span class="wpsl-country"><%= country %></span>' . "\r\n";
        }
    
        
        
         /**
         * Include the data from a custom field called 'my_textinput'.
         * 
         * Before you can access the 'my_textinput' data in the template, 
         * you first need to make sure the data is included in the JSON output.
         * 
         * You can make the data accessible through the wpsl_frontend_meta_fields filter.
         */
        // $listing_template .= "\t\t\t" . '<% if ( my_textinput ) { %>' . "\r\n";
        // $listing_template .= "\t\t\t" . '<p><%= my_textinput %></p>' . "\r\n";
        // $listing_template .= "\t\t\t" . '<% } %>' . "\r\n";
    
        // Show the phone, fax or email data if they exist.
        if ( $wpsl_settings['show_contact_details'] ) {
            $listing_template .= "\t\t\t" . '<% if ( phone ) { %>' . "\r\n";
            $listing_template .= "\t\t\t" . '<li class="list-group-item"><%= formatPhoneNumber( phone ) %></li>' . "\r\n";
            $listing_template .= "\t\t\t" . '<% } %>' . "\r\n";
            $listing_template .= "\t\t\t" . '<% if ( fax ) { %>' . "\r\n";
            $listing_template .= "\t\t\t" . '<span><strong>' . esc_html( $wpsl->i18n->get_translation( 'fax_label', __( 'Fax', 'wpsl' ) ) ) . '</strong>: <%= fax %></span>' . "\r\n";
            $listing_template .= "\t\t\t" . '<% } %>' . "\r\n";
            $listing_template .= "\t\t\t" . '<% if ( email ) { %>' . "\r\n";
            $listing_template .= "\t\t\t" . '<span><strong>' . esc_html( $wpsl->i18n->get_translation( 'email_label', __( 'Email', 'wpsl' ) ) ) . '</strong>: <%= email %></span>' . "\r\n";
            $listing_template .= "\t\t\t" . '<% } %>' . "\r\n";
        }
    
        $listing_template .= "\t\t\t\t" . '</ul>' . "\r\n";
        $listing_template .= "\t\t\t" . '<a href="<%= permalink %>" class="card-btn align-self-end">Посмотреть центр</a>' . "\r\n";
    
        $listing_template .= "\t\t\t" . wpsl_more_info_template() . "\r\n"; // Check if we need to show the 'More Info' link and info
        $listing_template .= "\t\t" . '</div>' . "\r\n";
        // $listing_template .= "\t\t" . '<div class="wpsl-direction-wrap">' . "\r\n";
    
        if ( !$wpsl_settings['hide_distance'] ) {
            $listing_template .= "\t\t\t" . '<%= distance %> ' . esc_html( $wpsl_settings['distance_unit'] ) . '' . "\r\n";
        }
    
        // $listing_template .= "\t\t\t" . '<%= createDirectionUrl() %>' . "\r\n"; 
    
        $listing_template .= "\t\t" . '</div>' . "\r\n";
        $listing_template .= "\t" . '</li>';
    
        return $listing_template;
    }
    Plugin Author Tijmen Smit

    (@tijmensmit)

    What’s the URL? I may not be possible to make the results list longer by itself since it’s wrapped in other div elements as well. So if you show the search results below the map, then you can only make that longer, but if it’s shown next to it, then you will have to make everything longer.

    Thread Starter bioweb

    (@bioweb)

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘height of #wpsl-stores’ is closed to new replies.