• Resolved isnulled

    (@luserl)


    Hello!

    For now Opening Hours supports only 12-hour clock system by default. Is there a way to switch to 24-hour?

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Alessandro Tesoro

    (@alessandrotesoro)

    Hi @luserl,

    Right now this can only be done by editing a template file of the plugin but I think it’s better if I add an option into the settings panel. I’ll add this into the next update.

    If you wish to change this right now, please let me know and I’ll give you the instructions to edit the file.

    Thread Starter isnulled

    (@luserl)

    If you wish to change this right now, please let me know and I’ll give you the instructions to edit the file.

    @alessandrotesoro , It would be nice. ??

    • This reply was modified 5 years, 4 months ago by isnulled.
    Plugin Author Alessandro Tesoro

    (@alessandrotesoro)

    Hi @luserl

    1) Read here how to customize templates https://docs.posterno.com/article/545-templates-customization

    2) Once you’ve understood where to place files, copy the file business-hours.php from the Posterno plugin’s subfolder templates/listings/

    3) Locate line 59 highlighted here https://github.com/Posterno/posterno/blob/master/templates/listings/business-hours.php#L59

    4) Replace this code

    
    <td><?php echo wp_kses_post( $set->to_string() ); ?></td>
    

    with this

    
    <td><?php echo wp_kses_post( $set->to_string('H:i') ); ?></td>
    

    5) Save the file.

    Hope this helps ??

    Thread Starter isnulled

    (@luserl)

    But in the submitting form it offers to choose AM/PM. ?? Any way to disable this?

    Plugin Author Alessandro Tesoro

    (@alessandrotesoro)

    Hi @luserl

    The modification above will only change the time displayed within the single listing page.

    In order to change the format on the submission form I’ll have to make changes to the js files and only I can do those changes. Rest assured this feature will be added into the next update ( v1.1.0 ) which is going to be released next week.

    This week there will be an update too but it’s only bug fixes/support for the first premium addon.

    Plugin Author Alessandro Tesoro

    (@alessandrotesoro)

    Hi @luserl,

    I’ve just released a new update with support for this feature. Go in Settings -> Posterno -> Listings -> Business hours and enable the option “24h format”.

    Enjoy ??

    Thread Starter isnulled

    (@luserl)

    Thats what i needed! Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘24-hours system for Opening Hours’ is closed to new replies.