WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Remove Select A Country value (7 posts)

  1. katart17
    Member
    Posted 2 years ago #

    The "Select A Country" value is appearing on the front end of the site. Is it possible for that not to appear when a country is not selected?

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. YEUStudent
    Member
    Posted 2 years ago #

    Was gonna ask the same question. Maybe a conditional check to hide it if the value is equal to "Select a country:"?

  3. thinkdm2
    Member
    Posted 2 years ago #

    I would also like the option to not display the Country if left blank, or as "Select A Country".

    Thanks.

  4. thinkdm2
    Member
    Posted 2 years ago #

    Ok, so I found the line of code that adds the Country to the address.

    For my particular project I do not need the Country at all, so I removed it completely.

    To do so, I copied the 'full-address.php' file that located in the 'views' directory.

    Then I created an 'events' folder inside my theme folder.

    After you have done so, open 'full-address.php' in your editor of choice and remove lines 39-41. They should look like this:

    <?php if( tribe_get_country( $postId ) ) { ?>
    		<?php $address_out []= '<span itemprop="addressCountry">' . tribe_get_country( $postId ) . '</span>'; ?>
    	<?php } ?>

    Refresh your page, and you should notice that the country is no longer showing.

    Hope that helps!

  5. katart17
    Member
    Posted 2 years ago #

    Fortunately I am aware of how I can create template override files (this is one of the many reasons The Events Calendar is so awesome), but really the purpose of this post was to notify the developers of the problem. This is a problem if some events need to define a Country and some don't.

  6. PeteAR
    Member
    Posted 2 years ago #

    The biggest problem I find with this is even if you do override the template so "select a country" doesn't show, it still screws up the search criteria for the Google Maps link, even though the map in the post is displayed correctly.

  7. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey guys. Thanks for the heads up on this, and for your posts helping each other out too. This is unfortunately a known issue that we've got in the works to be fixed. It won't be included in the 2.0.8 release that's coming out today or tomorrow, but it will be in 2.0.9 when that comes at the start of August.

    Thanks for your patience in bearing with us for an official solution on it so far. Let me know if you've got any other questions too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.