• ansarbhatti

    (@ansarbhatti)


    Hi,
    I need urgent support, store feature image not showing on the frontend you can see it on the above link. I already uploaded the feature images according to every store but nothing happens on the frontend.

    Please answers me asap. I will rate your plugin.

    Thanks

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

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

    (@tijmensmit)

    I see that there’s a custom CSS class in the search results, can you check if your using a custom code to overwrite the search results listings? You can see this in the functions.php inside your active theme folder. The thumb as shown on this line should be there.

    Also make sure to flush the transient cache on the WPSL settings page, and the cache from any other possible caching plugins.

    Thread Starter ansarbhatti

    (@ansarbhatti)

    @tijmensmit, i don’t get it please tell me how to fix this??

    Plugin Author Tijmen Smit

    (@tijmensmit)

    You have to find someone comfortable with code that look into this for you on the server if your not familiar with editing / reading code.

    The thumb should be default show up, so I suspect there’s a custom template used in the functions.php. You can find this file in the /wp-content/themes/your-theme-name folder. Open that file and search for ‘wpsl_listing_template’.

    Other thing that may break this is caching somewhere. If that’s the case, flushing the cache ( from a plugin, or on the WPSL settings page ( tools section ) may fix it.

    Thread Starter ansarbhatti

    (@ansarbhatti)

    @tijmensmit I already change the theme problem is same,

    Thread Starter ansarbhatti

    (@ansarbhatti)

    @tijmensmit
    I found this in the function.php file please have a look

    add_filter( 'wpsl_listing_template', 'custom_listing_template' );
        
        function custom_listing_template() {
        
            global $wpsl, $wpsl_settings;
            
            $listing_template = '<li data-store-id="<%= id %>">' . "\r\n";
            $listing_template .= "\t\t" . '<div class="custom-wpsl-left">' . "\r\n";
            $listing_template .= "\t\t\t" . '<p><span class="wpsl-jname">' . "\r\n";
            $listing_template .= "\t\t\t\t" . wpsl_store_header_template( 'listing' ) . "\r\n";
                    $listing_template .= "\t\t\t" . '<% if ( store_type ) { %>' . "\r\n";
    		$listing_template .= "\t\t\t" . '<span>(<%= store_type %>)</span><br>' . "\r\n";
    		$listing_template .= "\t\t\t" . '<% } %>' . "\r\n\r\n";
            
            $listing_template .= "\t\t\t\t" . '</span><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" . '</p>' . "\r\n";
            
            // Show the phone, fax or email data if they exist.
            $listing_template .= "\t\t\t" . '<p class="wpsl-contact-details">' . "\r\n";
            $listing_template .= "\t\t\t" . '<% if ( phone ) { %>' . "\r\n";
            $listing_template .= "\t\t\t" . '<span><strong>' . esc_html( $wpsl->i18n->get_translation( 'phone_label', __( 'Phone', 'wpsl' ) ) ) . '</strong>: <a href="tel:<%= formatClickablePhoneNumber( phone ) %>"><%= phone %></a></span>' . "\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>: <a href="mailto:<%= email %>"><%= email %></a></span>' . "\r\n";
            $listing_template .= "\t\t\t" . '<% } %>' . "\r\n";
            $listing_template .= "\t\t\t" . '</p>' . "\r\n";
            
            
            
            //$listing_template .= "\t\t\t" . '<p><a class="wpsl-store-details" href="#">' . "\r\n";
            //$listing_template .= "\t\t\t" . '<span>More info</span>' . "\r\n";
            //$listing_template .= "\t\t\t" . '</a></p>' . "\r\n";
            
            $listing_template .= "\t\t\t" . '<% if ( opening_hours_text ) { %>' . "\r\n\r\n";
            $listing_template .= "\t\t\t" . '<p><strong><span class="wpsl-store-details"><%= opening_hours_text %></span></strong></p>' . "\r\n";
            $listing_template .= "\t\t\t" . '<% } %>' . "\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";
            //}
            if ( !$wpsl_settings['hide_distance'] ) {
                $listing_template .= "\t\t" . '<div class="wpsl-direction-wrap"><%= distance %> ' . esc_html( $wpsl_settings['distance_unit'] ) . '</div>' . "\r\n";
            }
            $listing_template .= "\t\t" . '<%= createDirectionUrl() %>' . "\r\n"; 
            
            // End custom-wpsl-left 
            $listing_template .= "\t\t" . '</div>' . "\r\n";
            
            
            $listing_template .= "\t\t" . '<div class="custom-wpsl-rights">' . "\r\n";
            $listing_template .= "\t\t\t" . '<%= thumb %>' . "\r\n";
            // End custom-wpsl-right
            $listing_template .= "\t\t" . '</div>' . "\r\n";
            
            
            $listing_template .= "\t" . '</li>' . "\r\n";
        
            return $listing_template;
        }
    Plugin Author Tijmen Smit

    (@tijmensmit)

    Disabling all plugins also doesn’t fix this?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    This is how the default template should look like.

    <%= thumb %> is the one that renders the featured image.

    Thread Starter ansarbhatti

    (@ansarbhatti)

    @tijmensmit how can i fix it, i check with disable all plugin, same issue

    Plugin Author Tijmen Smit

    (@tijmensmit)

    On top of what I mentioned already, try to remove this line from the functions.php ‘add_filter( ‘wpsl_listing_template’, ‘custom_listing_template’ );’ and try again.

    You have to ask a developer otherwise to check everything, since by default the thumbnail always shows up, unless you modify something, and you did modify the template code since custom css classes are used.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Feature Image’ is closed to new replies.