Cab-Grid-Pro-LayoutsCab Grid Pro supports shortcode attributes that can adjust the appearance and functionality of each individual instance of Cab Grid on your website. This article discusses what shortcode attribute are available and how to implement them.

[Note: The Cab Grid Pro sidebar widget also allows these attributes to be set in the widget panel on the widgets page of the WordPress admin.]

The syntax for attributes is (use double quotes around values):

[cabGridPro attr1="val1" attr2="val2"]

Cab Grid Pro v5 introduced an alternative TABLE layout. For details of table layout shortcode attributes, see this article: https://cabgrid.com/help-and-support/price-table-shortcode/

Current Cab Grid Pro Shortcode Attributes

Click on an attribute tab to get details and example values…

The “id” attribute is used to uniquely identify an instance of Cab Grid Pro. This can then be used to target specific styling to an instance via CSS.

SYNTAX: [cabGridPro id="MyInstance5"]

The ID attribute of the main Cab Grid Pro element will be prefixed with ‘cabGridPro‘ so, for example, it could be addressed in CSS like this: #cabGridProMyInstance5 {background-color:red;}

In Cab Grid Pro v4 or earlier, the ID attribute also provided GROUP functionality (see GROUPS tab for more info).

From Cab Grid Pro v5, the “groups” attribute is used to limit the places (or areas) available by group or groups as defined under the AREAS tab on the Cab Grid Pro admin page.

In Cab Grid Pro v4 and earlier this functionality was provided via the ID attribute.

SYNTAX: [cabGridPro id="group1,group2"]

More info here…

The ‘layout‘ attribute is used to set which layout (or calculation model) is used for this particular instance of the Cab Grid Pro plugin.

If it is not set, the default layout will be used – as set in the OPTIONS tab of the Cab Grid Pro WordPress admin.

The layout attribute can currently be set to ‘passengers‘ or ‘vehicle‘ or ‘tickets‘ or ‘time

When set to ‘passengers‘ the Cab Grid interface will show input boxes for the number of passengers and number of luggage items, and use this information to calculate which vehicle is most appropriate and select a price.

When set to ‘vehicle‘ the Cab Grid interface will display details of all vehicles configured. The user will need to choose a vehicle as well as setting origin and destination to obtain a journey price.

When set to ‘tickets‘ the Cab Grid interface will show a single number input. This is for the number of tickets required. This is good for municipal transport such as bus, coach or train services. The number of tickets specified will multiply the price for the journey. So 2 tickets for a £10 journey will result in a price of £20.00 being displayed. (The number of tickets will govern which vehicle is selected – and hence price table.)

When set to ‘time‘ the Cab Grid interface will show a number input. This is for the number of time units required. The unit of time can be set in the OPTIONS tab when ‘Length of time‘ is selected for the ‘Price Based On’ option. This is good for tour or hire style businesses. The time period specified will multiply the price for the journey. So 2 units (hours, days, or whatever set) for a £10 journey will result in a price of £20.00 being displayed.

In ‘time‘ mode, the number of passengers field will also be displayed (though it is possible to hide this field through CSS). This is used to govern which vehicle is selected – and hence price table. The return button is also hidden in time mode as it is not relevant (though it may be re-enabled through CSS). The time option was introduced in Cab Grid Pro version 4.5.

SYNTAX: [cabGridPro layout="passengers"] or [cabGridPro layout="vehicle"]or[cabGridPro layout="tickets"]or[cabGridPro layout="time"]

This shortcode attribute was added in Cab Grid Pro version 3.0.

The ‘icons‘ attribute is used to set the general icon set and text colours the instance uses.

Currently, values can be set to ‘light’ or ‘dark’. Light icons (& text) are for instances with dark backgrounds and vice versa.

SYNTAX: [cabGridPro icons="light"]

This shortcode attribute was added in Cab Grid Pro version 3.0.

The ‘luggage‘ attribute is used to set if the luggage input field is hidden.

It expects values of either ‘Off’ (with capital ‘O’) to hide the input field, or ‘On’ (with upper-case ‘O’) to explicitly show the input field*.

SYNTAX: [cabGridPro luggage="Off"] OR [cabGridPro luggage="On"]

*The ‘On’ setting has only been available since Cab Grid Pro v4.5.2 and is only applicable where the luggage input is hidden by default (e.g. the tickets or time layouts).

ORIGIN and DEST shortcode attributes were added in Cab Grid Pro version 3.2.

These attributes allows you to pre-define (set the drop-down) for either pick up or destination.

Setting the ‘ORIGIN’ attribute to a value that exactly matches one of your place names will pre-define the pickup location drop down for this instance of the Cab Grid Pro plugin.

Setting the ‘DEST’ attribute to a value that exactly matches one of your place names will pre-define the drop-off location drop down for this instance of the Cab Grid Pro plugin.

The values set for ORIGIN and DEST must exactly match (case-sensitive) a place name set in the AREAS tab. The corresponding checkbox under the ‘Origin’ or ‘Destination’ columns in the AREAS tab must also be checked/ticked and the origin/dest entered must also be part of the GROUP.

For PASSENGER and TICKET layout modes, if both ORIGIN and DEST attributes are set and matched, the Cab Grid Pro interface will perform the calculation and return a price. In VEHICLE mode, the visitor must select a vehicle for the calculation to be performed.

Setting only one of either ORIGIN or DEST attributes will simply pre-populate the corresponding drop down and no calculation will be performed. The customer can then go on to select or change options to get a price and book as normal.

SYNTAX: [cabGridPro origin="place1" dest="place2"]

This shortcode attribute was added in Cab Grid Pro version 4.3.4.

The ‘vehicles‘ attribute is used to restrict the vehicles the instance uses for price calculations.

If set, in ‘vehicles’ layout mode, only the identified vehicles will be displayed. In other modes, the price lookup will be restricted to the vehicles identified.

The vehicles attribute expects vehicle ID numbers separated by a comma. The ID of a vehicle can be found by hovering the mouse over the vehicle name field under the VEHICLES tab on the Cab Grid Pro admin page: Get vehicle ID SYNTAX: [cabGridPro vehicles="6,1,4"]

From Cab Grid Pro version 5.0 (due for release soon), when in VEHICLE layout, the vehicles will be displayed in the order specified in this shortcode attribute. So, in the example above, the calculator will be laid out, left to right, starting with the vehicle with ID ‘6’, then ‘1’, then ‘4’.

This shortcode attribute was added in Cab Grid Pro version 4.5.6.

The ‘class‘ attribute is used to assign additional CSS classes to a Cab Grid Pro calculator instance. Class names are separated with a space. This is useful when targeting specific Cab Grid instances to style.

SYNTAX: [cabGridPro class="myCustomClassName anotherClass"]

Custom class names can also be assigned in the widget properties box when displaying Cab Grid taxi fare price calculator in a sidebar area.

This shortcode attribute was added in Cab Grid Pro version 5.0.

The ‘single‘ attribute is used to limit either the origin or destination drop down lists to a single place. (Note; this is similar to selecting only one place as an origin or destination in the AREAS tab, but using the single attribute, the setting can be applied to a specific instance of the Cab Grid taxi price calculator only, rather than all instances.)

The ‘single‘ attribute can be set to either ‘origin‘ (to limit the pick-up location list) or ‘dest‘ (to limit the destination location list). When the ‘single‘ attribute is defined the corresponding ‘origin‘ or ‘dest‘ attribute must also be defined.

SYNTAX: [cabGridPro single="origin" origin="Place Name"] [cabGridPro single="dest" dest="Other Place"]

Tags: , , , , , , , , , , , , ,

Pin It on Pinterest

  •  
  • Discount/Promo Code
  • Extras

    Select additional items to add to your booking

    • Water

      Water

      Chilled mineral water

      -+

      $1.49


No price found for this journey
x