Finding Your City ID

If you are setting up a shortcode widget you can grab the City IDs by creating a widget just to get the ID or follow these steps:

Navigate to and search for your city.


When it is finished searching you will see a list of cities that match your search. I searched Oklahoma City in the example and got only one result. You may see multiple results for your search.


Click on the City name that you want and it will take you to a specific city page for that city. Look at the URL for that page. You should see an ID in it. Simply copy that URL. For Oklahoma City it is 4544349.


Go back to your WordPress admin in the Widgets section and add the URL to the location field. This will bypass the location lookup and use the City ID to grab the weather for that city. This should help with problems where cities that cannot be found.