Adding Geo Data

The Data is entered and editing in the Geo Information section in the plugin menu. There are separate tabs for State, County and City information.

Using and Creating Templates

Templates are used to tell the plugin which WordPress pages you want to use for the various page combinations. You can access the template section by choosing Templates under the Geo Information plugin section. Once you choose to Add a new Template, you will be asked for the Page ID’s of the various pages we are using as follows:

Initial slug: This is the word we use after the URL. For example, if the setting is ‘mortgages’, the URL will look like:

URL/morgages/

State list template: This is the page that will display the list of states.
County list template: This is the page that will display the list of counties in the chosen state.
City list template: This is the page that will display the list of cities in the chosen county.
Individual city template: This is the page that will display the chosen city.
Sub Slug: This is the option text to display at the end of the URL. So for example, if we are on the Count list template, the URL would normally look like:

URL/mortgages/california/

But if Sub Slug were set to “mortgage-loans”, the URL would be: URL/mortgages/californi-mortgage-loans/

County slug on state page: Options are “use county name” or “do not use county name”. If use county name the URL would look like:

URL/mortgages/new-jersey/bergen-county-mortgage-loans/
URL/mortgages/new-jersey/bergen-county-mortgage-loans/

Default values when editing templates

Using the Plugin

The form of the plugin is as follows:

[geolead view=”list/dropdown” state=”all/value” county=”” initslug=”” subslug=”” pretext=”” posttext=”” sort=”asc/desc” selecttext=””]

Explanation of Shortcode Options

view (required): options are list for generating a list of options with links or a dropdown of options

state (required): either “all” for all states, or a specific state such as “california”. If you are using this inside of a template page where we know the state based on the URL you should use and the plugin will replace the state.

state (required): a specific state such as “los angeles county”. If you are using this inside of a template page where we know the county based on the URL you should use and the plugin will replace the county.

initslug (optional): only need it if you are using the plugin on a non-template page such as the homepage. Use the value of the subslug from the template table (e.g., “mortgage”).

subslug (optional): only need it if you are using the plugin on a non-template page such as the homepage. Use the value of the initial slug from the template table (e.g., “mortgage-loans”).

pretext (optional): if you want to include text before the values returned, so instead of California, you can show “Best Loans in California”

posttext (optional): if you want to include text after the values returned, so instead of California, you can show “California Mortgage Loans”

sort (optional): how you want to sort the list or dropdown. The default is asc.

selecttext (optional): only needed when view = “dropdown”. This is the default value in the dropdown that the user sees. If this option is not set, the value will default to “Select >>”. Note, if you want to use special characters such as “>>”, you must use the HTML equivalent so to display “Choose your State >>” you would use “Choose a State
& gt;& gt;” (note: no space betwen the & and gt;)

Using State/County/City values inside of a Page

To use the State/County/City name inside of your pages, you can use the format , or . The words must be lower case.

Other Variables

You can use all variables that are stored in the State, County and City tables. Here are the variables names:

state_abbr
state_governor
state_capital
state_description
state_lat
state_lng
state_pop_mask
state_area_mask
state_elevation_mask
state_timezone
state_zipcode
state_url

county_description
county_lat
county_lng
county_pop_mask
county_area_mask
county_elevation_mask
county_timezone
county_zipcode
county_url

city_mayor
city_description
city_lat
city_lng
city_pop_mask
city_households_mask
city_average_income_mask
city_land_area_mask
city_water_area_mask
city_elevation_mask
city_timezone
city_area_code
city_zipcode
city_url

** Formatting Numbers

In order to format #’s, include _mask after the name. So for example, the normal way to show the population value for a city would be:

##city_pop##

But the value is stored as an integer so it would be returned as 8322. But by using ##city_pop_mask## it will be returned and displayed as 8,322. Note above, we added the “_mask” option to the integer variables. You are free to display the variables without the formatting by removing “_mask”. So for example, use city_pop, instead of city_pop_mask.