Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter gr8whtd0pe

    (@gr8whtd0pe)

    I got it fixed. I was missing a required field on my application page.

    Thread Starter gr8whtd0pe

    (@gr8whtd0pe)

    Looks like it works if it is the default form, using the custom one breaks it. Is there a shortcode that needs included somewhere? I’ve compared the form code and everything looks to be the same, it just does not submit.

    Thread Starter gr8whtd0pe

    (@gr8whtd0pe)

    Never mind, I figured out what I wanted to do on my own. By adding the if statement of hours <= 0 it now shows a closed sign when the site is closed and a open sign when it has hours of operation.

    You can view it in action here https://199.101.51.194/~kcready/shelters/ . Use the zip of 25304 for results. Ignore the unfinished site.

    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\t\t" . '<% if ( hours <= 0 ) { %>' . "\r\n";
        	$listing_template .= "\t\t\t\t" . '<div class="sign_closed">Closed</div>' . "\r\n";
        	$listing_template .= "\t\t\t\t" . '<% } else { %>' . "\r\n";
    	$listing_template .= "\t\t\t\t" . '<div class="sign_open">Open</div>' . "\r\n";
    	$listing_template .= "\t\t\t\t" . '<% } %>' . "\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-street"><%= formatPhoneNumber( phone ) %></span>' . "\r\n";
        $listing_template .= "\t\t\t\t" . '<span class="wpsl-street"><%= hours %></span>' . "\r\n";
        $listing_template .= "\t\t\t" . '</p>' . "\r\n";
    
        $listing_template .= "\t\t" . '</div>' . "\r\n";  
    
        if ( !$wpsl_settings['hide_distance'] ) {
            $listing_template .= "\t\t" . '<%= distance %> ' . 'miles away from you.' . "\r\n";
        }
    
        $listing_template .= "\t\t" . '<%= createDirectionUrl() %>' . "\r\n";
        $listing_template .= "\t" . '</li>' . "\r\n";
    
        return $listing_template;
    }

    I was able to do this by adding the following code to my functions.

    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-street"><%= formatPhoneNumber( phone ) %></span>' . "\r\n";
        $listing_template .= "\t\t\t" . '</p>' . "\r\n";
    
        $listing_template .= "\t\t" . '</div>' . "\r\n";
    
        if ( !$wpsl_settings['hide_distance'] ) {
            $listing_template .= "\t\t" . '<%= distance %> ' . 'miles away.' . "\r\n";
        }
    
        $listing_template .= "\t\t" . '<%= createDirectionUrl() %>' . "\r\n";
        $listing_template .= "\t" . '</li>' . "\r\n";
    
        return $listing_template;
    }

    Any updates on this at all? I tried what was posted here and it does not work.

    I would just like for it to change thumbnails without going to a whole new page. It’s not a major thing, I would just like it. lol

    Oh and I know I can just use the Shutter effect, but I don’t like it, and it doesn’t match with the rest of the site if I do this.

    NextGEN Gallery Version: 1.5.3
    Wordpress Version: 2.9.2
    Site: https://www.wvshowandgo.com

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