Limit location dropdown for a specific country only

Let me show you an easy way to limit a country in location search dropdown and address field auto-suggest.

This mod will work only for WordPress themes ClassiPress v4.1.0+, Vantage v4.2.0+ and JobRoller v1.9.0+, which implement the AppMaps Geo framework by AppThemes. The Google Maps is the only supported AppMaps provider for this mod. Means, it will not work with Bing or MapQuest providers.

AppThemes themes implementing AppMaps framework have option "Region Biasing", which limits the country in location dropdown in soft way. It will suggest locations related to the selected country in the first places, but still, allow the other countries options select at the end of the list.

However, if you want to limit the country in strict way, i.e. do not allow to enter any other countries except selected, you would need to add the following code in your theme JS scripts file.

( function( $ ) { $( document ).on( 'appaddressautocompleteready', func…
Read more about Limit location dropdown for a specific country only
  • 0

Easy way to add custom PHP code on your WordPress site

A short instruction on how to Use Code Snippets plugin to add custom PHP code snippets on your WordPress site without files modifications.

We highly not recommend modifying WordPress themes and plugins!

A next software update will wipe out all the modifications from the code, so you will be forced to restore them each time.

The most obvious way is to create a child theme or custom plugin for all your code mods and snippets. But it requires you have some knowledge in coding. And if you are not skilled enough or don't want to hire a specialist for a 1-minute job, so try following.

There is an easy way to add some code on your site though the admin dashboard - using the Code Snippets plugin.

It allows you to create separated PHP code blocks (snippets) like you create new posts. You can disable or enable each snippet whenever it needs.

So, whenever you need to create a new custom PHP code snippet, you can do the follo…

Read more about Easy way to add custom PHP code on your WordPress site
  • 1