Time is time

Home Forums Calendar Products Events Calendar PRO Time is time

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #153541
    f2bproduction
    Participant

    Hello,

    For example on page: http://instinct.f2b-concept.com/billetterie/cityrire/

    And also on all pages where time appears …

    time appears: “2 juin 2014 @ 20 h 30 min – 21 h 30 min”

    I want to change the date “2 juin 2014 – De 20H30 à 21H30”

    Which file should I change ?

    Thank you

    #154207
    Barry
    Member

    Hi – great question!

    There are a few filters that can help you deal with this, but given what you’re trying to achieve it may be easiest do adjust your time format settings (via the relevant WordPress settings page) in order to change the format from 20 h 30 min to 20H30 and you can probably achieve the other changes with a snippet like this, which you might add to your theme’s functions.php file:

    add_filter( 'tribe_events_event_schedule_details', 'schedule_details' );
    
    function schedule_details( $schedule_text ) {
    	$schedule_text = str_replace( '@', '– De', $schedule_text);
    	$schedule_text = str_replace( '-', 'à', $schedule_text );
    	return $schedule_text;
    }

    Does that help at all?

    #154470
    f2bproduction
    Participant

    thank you

    This does not work … Maybe this is related to events-calendar plugin and not the theme. What do you think?

    #154764
    Barry
    Member

    You’re right, it’s nothing to do with your theme as such – your theme’s functions.php file is just a convenient place to put code like this (but if you’re experienced and prefer to use a standalone plugin or something like that you are of course more than welcome to).

    I’m not sure why it isn’t working in your case … does nothing change at all and can you share your theme’s functions.php file so I can see where you added the code in case something went wrong there?

    #154810
    f2bproduction
    Participant

    This reply is private.

    #154818
    f2bproduction
    Participant

    To replace:
    10 mai 2014 @ 19 h 00 min – 20 h 00 min
    By :
    10 mai 2014 – De 19H00 à 20H00

    #154851
    f2bproduction
    Participant

    $settings = array(
    ‘datetime_separator’ => ‘ > De ‘,
    ‘same_year_format’ => ‘j F Y’,
    ‘show_end_time’ => true,
    ‘time’ => true,
    );
    add_filter( ‘tribe_events_event_schedule_details’, ‘schedule_details’ );

    function schedule_details( $schedule_text ) {
    $schedule_text = str_replace( ‘ h ‘, ‘H’, $schedule_text);
    $schedule_text = str_replace( ‘min’, ”, $schedule_text );
    $schedule_text = str_replace( ‘ – ‘, ‘ à ‘, $schedule_text );
    return $schedule_text;

    #154854
    f2bproduction
    Participant

    Thanks

    #154863
    Barry
    Member

    Glad you got there!

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