Home › Forums › Calendar Products › Events Calendar PRO › Time is time
- This topic has 8 replies, 2 voices, and was last updated 11 years, 12 months ago by
Barry.
-
AuthorPosts
-
May 7, 2014 at 11:12 pm #153541
f2bproduction
ParticipantHello,
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
May 8, 2014 at 3:31 pm #154207Barry
MemberHi – 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?
May 8, 2014 at 9:39 pm #154470f2bproduction
Participantthank you
This does not work … Maybe this is related to events-calendar plugin and not the theme. What do you think?
May 9, 2014 at 5:20 am #154764Barry
MemberYou’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?
May 9, 2014 at 5:58 am #154810f2bproduction
ParticipantThis reply is private.
May 9, 2014 at 6:00 am #154818f2bproduction
ParticipantTo replace:
10 mai 2014 @ 19 h 00 min – 20 h 00 min
By :
10 mai 2014 – De 19H00 à 20H00May 9, 2014 at 6:11 am #154851f2bproduction
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;May 9, 2014 at 6:12 am #154854f2bproduction
ParticipantThanks
May 9, 2014 at 6:14 am #154863Barry
MemberGlad you got there!
-
AuthorPosts
- The topic ‘Time is time’ is closed to new replies.
