CabGrid Pro supports shortcode attributes that can adjust the appearance and functionality of each individual instance of CabGrid on your website. This article discusses the available shortcode attributes and how to implement them.
Note, CabGrid can also be added to a page as a widget or a Gutenberg block. Each provides its own user interface to assign attribute values. However, the definitions below still apply.
In addition to the standard price calculator, CabGrid Pro also provides a table layout shortcode:
This can be configured with its own attributes. These are detailed in a separate article.
Shortcode Attribute Syntax
The syntax for attributes is (use double quotes around values):
[cabGridPro attr1="val1" attr2="val2"]
When using the WordPress Classic Editor (aka TinyMCE) to edit posts or pages, the Cab Grid icon () will insert the Cab Grid Pro shortcode with all available attributes and some default values. Otherwise, attributes can be added as required.
Current Cab Grid Pro Shortcode Attributes
Click on an attribute title to get details and example values…
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:
In Cab Grid Pro v4 or earlier, the ID attribute also provided GROUP functionality (see GROUPS tab for more info).
In Cab Grid Pro v4 and earlier this functionality was provided via the ID attribute.
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.
[cabGridPro layout="passengers"] or
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.
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*.
*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 & DEST
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.
[cabGridPro origin="place1" dest="place2"]
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. This will also restrict the maximum capacity for passengers, luggage, etc. to that of the highest capacity vehicle 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:
From Cab Grid Pro version 5.0, 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’.
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.
[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.
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.
[cabGridPro single="origin" origin="Place Name"]
[cabGridPro single="dest" dest="Other Place"]
This shortcode attribute was added in Cab Grid Pro version 5.1.11
The ‘onewayrtn‘ attribute is used to preset the one-way/return icon. It accepts the following values for:
PASS, LUGG, TICK & TIME
Note; setting these attributes within the Cab Grid Pro shortcode will override any values defined via the Defaults Add-on or _settings.php file. However, if values are set in a link via query string parameters, the shortcode attributes will ignored.
The ‘pass’ attribute is used to set the number of passengers shown when the Cab Grid Pro calculator loads in ‘passengers’ layout.
The ‘lugg’ attribute is used to set the quantity of luggage items shown when the Cab Grid Pro calculator loads in ‘passengers’ layout.
The ‘tick’ attribute is used to set the number of tickets shown when the Cab Grid Pro calculator loads in ‘tickets’ layout.
[cabGridPro layout="tickets" tick="4"]
The ‘time’ attribute is used to set the quantity of time units shown when the Cab Grid Pro calculator loads in ‘time’ layout.
[cabGridPro time="8" layout="time"]
Change the Cab Grid Pro calculator input type displayed between regular text (number) inputs and drop-down menus (HTML <select> boxes).
This shortcode attribute was added in Cab Grid Pro version 5.6.6
Effected inputs: Number of passengers, Quantity of Luggage, Number of Tickets, Number of Time Units.
The ‘dropdown‘ attribute is used to set the appearance of number inputs in the Cab Grid Pro calculator. It accepts the following values for:
Default value: ‘n’
The regular number input field allows mobile devices to show a native number input interface and is preferred.
Note: This option can be defined globally via the _settings.php file (or defaults add-on).
Tags: areas, attributes, destination, groups, icons, id, instance, layout, luggage, origin, pre-defined, preset, shortcode, vehicles
Slots are slots. If you’re utilized to playing them in a brick-and-mortar casino, you’re not customary to partake of any be concerned adapting to their online cousin. The treat is the same: interpolate your percentage, preferable your paylines and conk the twirl button to bet.
What you will attend to, although, is that the online fit games are more convenient. It takes basic seconds to swap machines, and you don’t imperturbable hold to worry about someone hogging a particular shape, acting repellent (drunk) or blowing smoke in your face. You can even swap casinos if you necessity to. Online casinos are also cheaper to deposit to, and you can part of as regards free if you’re not amenable to pit oneself against with money.
wizard of oz slots
The davy jones’s locker line? Online slots are like brick-and-mortar slots in approaching every technique, with additional benefits. If you’re a fan of these money-sucking machines, then we second giving their online counterpart a shot. But earliest, start with this page. Learn on every side all the numerous games you can play.
Our position also offers sections for online players. We offer 10,000+ unfettered pigeon-hole games. The free games episode includes some of the best made slots on the side of online players and all of the games weight instantly in your browser. You wishes also unearth sections relating to where to pleasure 3D slots, high limit and ill-bred limit games (such as penny slots) as well as physical legal tender sites. If you have any questions, interest feel self-ruling to with us.
I was looking to buy to your plugin but I found out that though in desktop your drop point & pickup point is searchable drop-down but in mobile site it is scrolling list. We can’t type to search location in mobile site. Can u advised on this?