Change Photo View Date Selector to be the same as in Month view

Home Forums Calendar Products Events Calendar PRO Change Photo View Date Selector to be the same as in Month view

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #235703
    indrakubicek
    Participant

    Hi 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!

    #235705
    indrakubicek
    Participant

    edit: that *doesn’t* seem to do the trick.

    #236410
    Barry
    Member

    Would 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.

    #236475
    indrakubicek
    Participant

    Thanks 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?

    #238013
    Barry
    Member

    Yes 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!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Change Photo View Date Selector to be the same as in Month view’ is closed to new replies.