• Resolved toca711

    (@toca711)


    Hi.

    First thanks for the awesome plugin (Do you have any way to donate?)

    Is there any way to show only open hour on a listing and not close-hours. (I can’t use CSS as this hides both open and close hour.)
    I tried modifying wpsl-admin and wpsl-admin.min but this didn’t work either.
    Any ideas?

    Thanks

    https://www.ads-software.com/plugins/wp-store-locator/

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

    (@tijmensmit)

    Add this code to the functions.php inside your active theme folder, flush the store locator transient cache on the settings page ( tools section ), and reload the store locator.

    add_filter( 'wpsl_hide_closed_hours', '__return_true' );
    Thread Starter toca711

    (@toca711)

    Hi Tijmen.

    Thanks for your reply. I understand how your filters work. This one hides the days where there are no store hours.
    I need to be able to show only opening hours for each day.

    Currently a listing will show Saturday 9.00am – 5.00pm.
    I want it to show Saturday 9.00am.

    This is because the sight I am building is for a number of services that open at a certain time each day but have an indefinite closing time. (They close once all clients are seen.)

    Is this possible?

    Thanks

    Plugin Author Tijmen Smit

    (@tijmensmit)

    This isn’t possible without changing the core files.

    Although, you could use this filter to add custom styled opening hours to the returned search data, and then use this filter to make it show up on the front-end.

    You can access the hours with this line inside the wpsl_store_meta filter.

    $opening_hours = get_post_meta( $store_id, 'wpsl_hours' );

    Then use this code example to base your custom code on to leave out the close hours.

    Thread Starter toca711

    (@toca711)

    Managed to make that works for my needs.

    Thanks for your great work!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show only open hour not close hour’ is closed to new replies.