User guide

The Cost Calculator page provides a way for site visitors to compare the total cost of travel for three different airports.

The factors included in the cost calculation are:

  1. Address traveler will drive from to reach the airport (‘Starting point’).
  2. Traveler’s salary
  3. Number of days traveler will use airport parking
  4. Airfare from each airport
  5. Location of the airport
  6. Cost of fuel/mile
  7. Airport parking rate and type (daily or flat fee).

Items 1 – 4 are entered by the traveler. Items 5 – 7 are maintained by the site administrator.

To maintain the parameters for each airport (name, code, parking cost, parking type, location, etc.) do the following:

Click the ‘CC Params’ item in the left side admin menu (see below):

This will take you to the following screen – click ‘CC Params Master” to update parameters for the airports:

Next, a page with all the parameters is displayed. The parameters are divided into groups; fuel cost, Google Maps Key, and three sets of airport-specific parameters. In the example below the ‘Fuel cost’ and ‘CC params – SAF’ parameter groups are open. All groups can be opened or closed by clicking the arrow to the right.

The group ‘CC params – SAF refers to the Santa Fe airport details. The groups ‘CC params – Comp1’ and ‘CCparams – Comp2’ two comparison airports. The airports are determined by the location set in the ‘Address’ field. Each field includes instructions.

When the changes are complete, click the ‘Update’ button near the upper left (see below):

Technical Notes:

The custom post type CC Params is used to hold the parameters that drive the Cost Comparison calculations. The post type was initially created with the CPT UI plugin.

The field groups are created in ACF pro.

The form is created in Formidable Forms Pro.

The custom javaScript is located in the Loka Creative Core plugin: wp_content/plugins/LC-core/local/includes/costCalculator.php.

The dashboard widget pointing to this page is in the Loka Creative Core plugin: wp_content/plugins/LC-core/local/includes/dashboardDocs.php