Tyrion Lannister is brutally honest

He’s indeed a brutally honest little big man. If you’ve seen the latest episode of Game of Thrones last night, you’ll surely applause in the speech he made before Season 4 Episode 6 ended. I filed this post under Awesomeness because it’s truly awesome and epic. Epic in the sense that it’s one of the best episodes I’ve seen so far. An awesome because it’s really an awesome episode. Yep, it’s super duper awesome!
Continue reading “Tyrion Lannister is brutally honest”

Events Manager Plugin: Remove or Add Countries in Dropdown using WordPress Filters

If you’re using the famous Events Manager plugin and you want to remove or add the default countries in the drop down menu without modifying the core file (em-functions.php) you can simply add a filter in your functions.php inside your WordPress theme file. Below is a very short code that I made and you can simply modify it without my permission.

function customcountries(){
$em_countries_custom['US'] = 'United States';
$em_countries_custom['PH'] = 'Philippines';
return $em_countries_new;

Just add the code above in your functions.php file, and it will work. This will replace your very long countries dropdown to just United States and Philippines.

I’m a PHP noob, so I don’t know if the unset variable is appropriate to use in this function or not. But it did the trick, so I’m using it. All I did is removed the default countries by using unset and just returned the custom countries that I added.

After adding the code, the Countries dropdown in your Submit Events form will look like this:

It works like magic! Try it out!