Modifying Venue fields

Home Forums Calendar Products Events Calendar PRO Modifying Venue fields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #963086
    Chris
    Participant

    We’d like to change the title of “Venue” to “Where”, is there a sensible way of doing this or do we need to work out some sort of code hack?

    #963270
    George
    Participant

    Hey Chris!

    You should be able to do this on your site for sure – it will indeed require some custom code, which we unfortunately can only provide limited support for, but before getting into all that, can you first elaborate a bit on exactly what you mean when you mention wanting to change the name “Venue”?

    For example, do you only want this change to be apparent in the Admin of your site? Or just on the front-end? Or both?

    The simplest way to get started, regardless of the specifics of the above questions, is to use the Venue label filters for both the plural and singular instances of the word “Venue”. You can do this by adding code like the following to the bottom of your theme’s functions.php file:

    
    add_filter('tribe_venue_label_singular', 'tribe_change_single_venue_label' );
    
    function change_single_venue_label() {
        return 'Where';
    }
      
    add_filter('tribe_venue_label_plural', 'tribe_change_plural_venue_label' );
    
    function change_plural_venue_label() {
        return 'Where';
    }
    

    Try that out and see how much it helps, if at all – let us know more details about your goals from there! πŸ™‚

    Thanks,
    George

    #964126
    Chris
    Participant

    Perfect, thanks George πŸ™‚

    #964195
    George
    Participant

    No problem! πŸ™‚ Be sure to keep good backups of your site and database as you play around with custom code, just as a safety in case anything breaks on your site and you need to quickly restore it – unlikely, but possible, so backups are always wise!

    Cheers,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Modifying Venue fields’ is closed to new replies.