Same Venue Names

This topic contains 4 replies, has 2 voices, and was last updated by  Dan Brubaker 5 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #32765

    My client needs to be able to create venues with the same titles but different addresses. I was surprised to find out that this is gives an error and is not possible. I figured that EO would ++ the slugs and allow for this. (Better yet would be appending the city and state to the slug.)

    Is there a hook / filter that I can use to allow this functionality?

    Dan Brubaker
    #32826

    So the issue here as you point out is duplicate slugs. Unfortunately because there is no suitable filter you can’t change the slug programatically, however I will add such a filter.

    In the mean time a work around is to create a venue with a unique name (e.g. include the city) and then edit the venue name afterwards.

    Stephen Harris
    #32856

    Ah, yes. I see how that would work. Thank you!

    Adding the filter will be great!

    • This reply was modified 5 years, 1 month ago by  Dan Brubaker.
    Dan Brubaker
    #32959

    In the next release, the following will be possible:

    add_filter('eventorganiser_pre_insert_venue', function($args){
        $args['slug'] = sanitize_title($args['name'] . ' ' . $args['city']);
        return $args;
    });
    
    Stephen Harris
    #33281

    That’s great. Thank you!

    Dan Brubaker
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.