Disable Country

Home Forums Calendar Products Community Events Disable Country

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #991431
    Stephan
    Participant

    Hi Guys,

    i´m using the community event plugin and i love it.

    There´s just one thing that´s annoying me.

    I´m running a german news-website accordingly suitable only for german visitors

    My area of ​​influence affects only a little area in germany.

    So i ask myself: Why do my users have to choose a country in the event form?

    I would like to disable the whole country-thing, because 100% of my events are in Germany

    I found this thread: https://theeventscalendar.com/support/forums/topic/third-time-lucky-default-country/

    but that does not go far enough to me. How can i disable the country-selector(s) ?

    Thank you very much

    Stephan

    #991590
    Nico
    Member

    Hi Stephan,

    Thanks for reaching out to us, and also thanks for searching the forums for an answer before posting!

    I think the easiest way of doing this is to perform a template override of the venues module template for community submission. While this sounds tricky the process is quite simple, I’ll describe it below but be sure to check our Themer’s guide for more detailed info. So let’s jump into this:

    – Inside your theme folder – ‘wp-content/themes/your_theme/’- create the following folder structure: ‘tribe-events/community/modules/’.
    – Drop a copy of the file ‘wp-content/plugins/the-events-calendar-community-events/src/views/community/modules/venue.php’.
    – Edit the just copied file. Add this code after line 69, to make Germany the default country:

    $venue_country = "Germany";

    – To hide the Country combo box, change line 122 and to the following:

    <tr class="venue" style="display:none;">

    Please let me know if this works for you,
    Best,
    Nico

    #991666
    Stephan
    Participant

    This reply is private.

    • This reply was modified 10 years, 8 months ago by Stephan.
    #991788
    Nico
    Member

    Hi Stephan,

    Sorry to hear about that 🙁

    I can’t see the screenshot you shared, Can you try sharing it via CloudUp or a similar service?

    Thanks,
    Nico

    #994115
    Stephan
    Participant

    This reply is private.

    #994690
    Nico
    Member

    Hey Stephan,

    Thanks for following up, and no problem with the delay. I see the error now and my guess is you pasted the code after the PHP closing tag, sorry if my instructions were not clear enough. Just to be sure we get this right this time I’ve uploaded the modified template for you to copy it into your theme.

    Just replace the content of the template override file you created at ‘wp-content/your_theme/tribe-events/community/modules/venue.php’, with this code:

    https://gist.github.com/niconerd/f923cbccf6a9252c1642

    Save, test and let me know 😉
    Best,
    Nico

    #994730
    Stephan
    Participant

    Hi Nico,

    that works like clockwork

    You are awesome

    Thank you very much!!!

    Stephan 🙂

    #994770
    Nico
    Member

    Glad to hear buddy, it’s a pleasure to help 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to help.

    Best of luck with your project,
    Nico

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Disable Country’ is closed to new replies.