Home › Forums › Calendar Products › Community Events › Disable Country
- This topic has 7 replies, 2 voices, and was last updated 10 years, 8 months ago by
Nico.
-
AuthorPosts
-
July 29, 2015 at 8:09 am #991431
Stephan
ParticipantHi 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
July 29, 2015 at 2:58 pm #991590Nico
MemberHi 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,
NicoJuly 29, 2015 at 11:56 pm #991666Stephan
ParticipantThis reply is private.
-
This reply was modified 10 years, 8 months ago by
Stephan.
July 30, 2015 at 8:13 am #991788Nico
MemberHi 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,
NicoAugust 6, 2015 at 11:36 pm #994115Stephan
ParticipantThis reply is private.
August 10, 2015 at 5:56 am #994690Nico
MemberHey 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,
NicoAugust 10, 2015 at 7:32 am #994730Stephan
ParticipantHi Nico,
that works like clockwork
You are awesome
Thank you very much!!!
Stephan 🙂
August 10, 2015 at 8:38 am #994770Nico
MemberGlad 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 -
This reply was modified 10 years, 8 months ago by
-
AuthorPosts
- The topic ‘Disable Country’ is closed to new replies.
