Home › Forums › Calendar Products › Events Calendar PRO › Change Photo View Date Selector to be the same as in Month view
- This topic has 4 replies, 2 voices, and was last updated 11 years, 10 months ago by
Barry.
-
AuthorPosts
-
June 19, 2014 at 9:46 am #235703
indrakubicek
ParticipantHi there,
I’d like to change the Photo View Date Selector in the Tribe Events Bar to be the same as in Month view, i.e. rather than displaying ‘Date’ and being able to select a specific date, I want it to say ‘Events in’ and just given the options to choose a specific month.
I’m guessing I can do this using a template override? I tried simply changing
<?php tribe_get_template_part( 'pro/photo/nav', 'header' ); ?>
in theme-folder/tribe-events/pro/photo/content.php to
<?php tribe_get_template_part( 'month/nav'); ?>
as used in theme-folder/tribe-events/month/content.php
But that seem to do the trick. Can you help?
Thanks!
June 19, 2014 at 9:47 am #235705indrakubicek
Participantedit: that *doesn’t* seem to do the trick.
June 19, 2014 at 4:20 pm #236410Barry
MemberWould this help?
add_filter( 'tribe_bar_datepicker_caption', 'change_date_filter_text' ); function change_date_filter_text( $caption ) { if ( ! tribe_is_photo() ) return $caption; return 'Events in'; }You could add this to your theme’s functions.php file, for example.
June 19, 2014 at 4:43 pm #236475indrakubicek
ParticipantThanks Barry, if I just wanted to change the text that is displayed, that would help, yes. But I don’t.
I obviously wasn’t really clear enough, because I think you missed a key part of my question:
“<b>rather than</b> displaying ‘Date’ and <b>being able to select a specific date, I want</b> it to say ‘Events in’ and <b>[to be]just given the options to choose a specific month.</b>”
So, it isn’t just the <i>text</i> from the month view I want to use in photo view it is the <b>functionality</b>.
Make sense?
June 20, 2014 at 6:21 am #238013Barry
MemberYes that makes sense – sorry I didn’t pick up on that 🙂
That would however be a more advanced customization and one we’d really need to leave to you to figure out (if it’s necessary). If you are interested in investigating this in more depth, please review the following sections of code to see how it pieces together:
- resources/tribe-events.js (approx lines 1037-1052 and tribe_ev.data.date_formats in particular)
- resources/tribe-events-ajax-calendar.js (approx lines 38-58 where you can see the month-style format being selected)
Beyond that, we always welcome new feature requests if you’d like to post one along the lines of making this a configurable option.
Thanks!
-
AuthorPosts
- The topic ‘Change Photo View Date Selector to be the same as in Month view’ is closed to new replies.
