Shortcodes

Web 2.0 Directory plugin accepts 12 shortcodes: 1 main [webdirectory] and 11 additional to add your own directory pages. The plugin is fully compatible with WordPress Visual Composer plugin, this is the best way to build pages using VC plugin with its amazing backend editor.

[webdirectory]

This is main shortcode, required for stable functionality of the plugin. This shortcode may have 1 attribute "custom_home", when you set up [webdirectory custom_home=1] - the shortcode displays only listings, no map, no categories block, no search form. This special mode allows to build custom directory home page as you wish using additional shortcodes. Total configuration implemented from admin dashboard.

Example
Example custom home page 1
Example custom home page 2
Example custom home page 3

[webdirectory-listing]

Builds special page for single listings. If you want separate "template" page for every single listing - create new page with this shortcode.

Also this is possible to build special page for exact listing using parameter:

  • listing_id - enter exact ID of listing. Leave empty to build custom page for any single listing.

[webdirectory-listings]

This shortcode is used to build additional pages with listings. Supports following filters:

  • uid - enter unique string to connect this shortcode with another shortcodes.
  • onepage - show all possible listings on one page.
  • ajax_initial_load - load listings only after the page was completely loaded.
  • perpage - number of listings to display per page. Set -1 to display all listings without paginator (default 10).
  • hide_paginator - when paginator is hidden - it will display only exact number of listings.
  • sticky_featured - show only sticky or/and featured listings (default 0).
  • order_by - possible values: post_date, title, distance - when listings search in radius (default "post_date"). Also this is possible to order by some content fields, those types have ordering functionality: Text string, Date-Time, Number, Price. Just need to set content field slug as this attribute.
  • order - direction of sorting: ASC or DESC (default "ASC").
  • hide_order - hide ordering navigation links (default 0).
  • hide_count - hide number of found listings (default 0).
  • show_views_switcher - show listings views switcher (default 1).
  • listings_view_type - listings view by default, 'list' or 'grid' (default 'list').
  • listings_view_grid_columns - number of columns for listings Grid View (1,2,3 or 4), default 2.
  • listing_thumb_width - listing thumbnail logo width in List View (in pixels).
  • wrap_logo_list_view - wrap logo image by text content in List View.
  • logo_animation_effect - thumbnail animation hover effect, from 0 to 6 (default 6).
  • address - display listings near this address, recommended to set "radius" attribute.
  • radius - display listings near provided address within this radius in miles or kilometers - according to dimension parameter from directory settings.
  • author - enter exact ID of author or word "related" to get assigned listings of current author (works only on listing page or wordpress author page).
  • related_categories - get listings with same categories. Parameter works only on listings and categories pages (0 or 1).
  • categories - comma separated string of categories IDs or slugs - use only IDs or only slugs.
  • locations - comma separated string of locations IDs or slugs - use only IDs or only slugs.
  • related_locations - get listings in same locations. Parameter works only on listings and locations pages (0 or 1).
  • tags - comma separated string of tags IDs or slugs - use only IDs or only slugs.
  • related_tags - get listings of same tags. Parameter works only on listings and tags pages (0 or 1).
  • include_categories_children - include children of selected categories and locations. When enabled - any subcategories or sublocations will be included as well. Related categories and locations also affected.
  • levels - comma separated string of levels IDs. Here you may filter which listings to display by its levels.
  • post__in - comma separated string of listings IDs. Possible to display exact listings.

This is possible to filter by content fields values like on search page. Filters depend on content fields types:

  • Text string and Textarea - filter in such format: field_SLUG="string"
  • Number - here are 2 variants: when content field was configured to search by exact values - field_SLUG="number"; when content field was configured to search by MIN and MAX values - field_SLUG_min="number" and/or field_SLUG_max="number"
  • Price - the same as for Number type
  • Date-Time - define date range in following format: field_SLUG_min="dd.mm.yyyy" and/or field_SLUG_max="dd.mm.yyyy"
  • Select list, Radio buttons and Checkboxes - filter in such format: field_SLUG="comma separated selection items IDs". Select list, Radio buttons support only single ID.

Example
Example
Example
Example
Example
Example

[webdirectory-map]

This shortcode is used to build google maps with listings locations as map markers. This shortcode supports most of filters for [webdirectory-listings] shortcode + additional attributes:

  • custom_home - when set to 1 it enables special mode, that allows to build custom directory home page as you wish. Now the map depends on [webdirectory] shortcode.
  • uid - enter unique string to connect this shortcode with another shortcodes.
  • draw_panel - enable Draw Panel.
  • search_on_map - show search form on the map.
  • num - maximum number of markers to display on map (default "-1" - this means unlimited).
  • sticky_scroll - special option makes the map to be sticky on scroll (default 0).
  • sticky_scroll_toppadding - sticky scroll top padding in pixels (default 10).
  • show_summary_button - show "« Summary" button in info window (default 0).
  • show_readmore_button - show "Read more »" button in info window (default 1).
  • map_style - Google Maps style.
  • width - set map width (by default whole possible width).
  • height - set map height (default 300).
  • radius_cycle - display radius cycle on map when radius filter provided (default 0).
  • clusters - group map markers in clusters (default 0).
  • geolocation - enable automatic geolocation (default 0).
  • ajax_loading - when map contains lots of markers - this may slow down map markers loading. Select AJAX to speed up loading. Requires Starting Address or Starting Point coordinates Latitude and Longitude.
  • ajax_markers_loading - maps info window AJAX loading. This may additionaly speed up loading.
  • start_address - when map markers load by AJAX - it should have starting point and starting zoom. Enter start address or select latitude and longitude. Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. Depends on ajax_loading attribute.
  • start_latitude - starting point latitude. Depends on ajax_loading attribute.
  • start_longitude - starting point longitude. Depends on ajax_loading attribute.
  • start_zoom - starting point zoom. Depends on ajax_loading attribute.
  • enable_full_screen - enables full screen button (default 1).
  • enable_wheel_zoom - enables zoom by mouse wheel (default 1). For desktops.
  • enable_dragging_touchscreens - enables map dragging on touch screen devices (default 1).
  • center_map_onclick - center map on marker click (default 0).

+ attributes from [webdirectory-listings] shortcode, such as: sticky_featured, address, radius, categories, locations, author, related_categories, related_locations, related_tags, levels, post_in, include_categories_children and special content fields filters.

Example
Example
Example
Example
Example
Example

[webdirectory-categories]

This shortcode is used to build categories lists. This shortcode supports following attributes:

  • custom_home - when set to 1 it enables special mode, that allows to build custom directory home page as you wish. Now categories block depends on [webdirectory] shortcode.
  • parent - ID of parent category (default 0 - this will build whole categories tree starting from the root).
  • depth - categories nesting level (default 1).
  • subcats - this is the number of subcategories those will be displayed in the table, when category item includes more than this number “View all subcategories ->” link appears at the bottom.
  • columns - number of categories columns, up to 4 categories (default 2).
  • count - show the number of listings inside categories (default 1).
  • levels - categories may be dependent from listings levels. Comma separated string of levels IDs.
  • categories - comma separated string of categories slugs or IDs. Possible to display exact categories.

Example

[webdirectory-locations]

This shortcode is used to build locations lists. This shortcode supports following attributes:

  • custom_home - when set to 1 it enables special mode, that allows to build custom directory home page as you wish. Now locations block depends on [webdirectory] shortcode.
  • parent - ID of parent location (default 0 - this will build whole locations tree starting from the root).
  • depth - locations nesting level (default 1).
  • sublocations - this is the number of sublocations those will be displayed in the table, when location item includes more than this number “View all sublocations ->” link appears at the bottom.
  • columns - number of locations columns, up to 4 locations (default 2).
  • count - show the number of listings inside locations (default 1).
  • locations - comma separated string of locations slugs or IDs. Possible to display exact locations.

Example

[webdirectory-search]

This shortcode builds directory search box. Total configuration implemented from admin dashboard. Arguments of this shortcode:

  • uid - enter unique string to connect this shortcode with another shortcodes.
  • columns - number of columns to arrange search fields. Possible to place search form fields in 1 or 2 columns.
  • advanced_open - advanced search panel always open (default 0).
  • show_what_search - show/hide "what search" section (default 1).
  • show_categories_search - show/hide categories search field (default 1).
  • show_keywords_search - show/hide keywords search field (default 1).
  • category - preset certain category ID for the search form.
  • what_search - preset keywords for the search form.
  • show_radius_search - show/hide radius slider (default 1).
  • radius - default radius value (in miles/kilometers).
  • show_where_search - show/hide "where search" section (default 1) (default 1).
  • show_locations_search - show/hide locations search field (default 1).
  • show_address_search - show/hide address search field (default 1) (default 1).
  • address - preset address string for the search form.
  • location - preset certain location ID for the search form.
  • search_fields - select certain content fields (comma separated IDs).
  • search_fields_advanced - select certain content fields in advanced section (comma separated IDs).

This is possible to preset values for content fields values of the search form. Parameters depend on content fields types:

  • Text string and Textarea - filter in such format: field_SLUG="string"
  • Number - here are 2 variants: when content field was configured to search by exact values - field_SLUG="number"; when content field was configured to search by MIN and MAX values - field_SLUG_min="number" and/or field_SLUG_max="number"
  • Price - the same as for Number type
  • Date-Time - define date range in following format: field_SLUG_min="dd.mm.yyyy" and/or field_SLUG_max="dd.mm.yyyy"
  • Select list, Radio buttons and Checkboxes - filter in such format: field_SLUG="comma separated selection items IDs". Select list, Radio buttons support only single ID.

Examples

[webdirectory-submit]

Works only when frontend submit plugin enabled. This shortcode builds listings submission pages. The process of listing creation divided in some steps, the number of steps varies according to different conditions: log in step may be missed if user was already logged in, payment step either doesn’t required for free listings. This shortcode supports following attributes:

  • show_steps - show/hide submission steps (default 0).
  • columns - columns number on choose level page (default 3).
  • columns_same_height - show parameters those have negation. For example, such row in table will be shown: Featured Listings - No. In other case it will be completely hidden. (default 1).
  • levels - choose exact levels to display. Comma separated levels IDs.
  • show_period - show/hide level active period on choose level page.
  • show_sticky - show/hide is level sticky on choose level page.
  • show_featured - show/hide is level featured on choose level page.
  • show_categories - show/hide level's categories number on choose level page.
  • show_locations - show/hide level's locations number on choose level page.
  • show_maps - show/hide is level supports maps on choose level page.
  • show_images - show/hide level's images number on choose level page.
  • show_videos - show/hide level's videos number on choose level page.

Example

[webdirectory-levels-table]

Works only when frontend submit plugin enabled. Listings levels table. Works in the same way as 1st step on Listings submit, displays only pricing table. Note, that page with Listings submit element required. This shortcode supports following attributes similar to [webdirectory-submit] shortcode:

  • columns - columns number on choose level page (default 3).
  • columns_same_height - show parameters those have negation. For example, such row in table will be shown: Featured Listings - No. In other case it will be completely hidden. (default 1).
  • levels - choose exact levels to display. Comma separated levels IDs.
  • show_period - show/hide level active period on choose level page.
  • show_sticky - show/hide is level sticky on choose level page.
  • show_featured - show/hide is level featured on choose level page.
  • show_categories - show/hide level's categories number on choose level page.
  • show_locations - show/hide level's locations number on choose level page.
  • show_maps - show/hide is level supports maps on choose level page.
  • show_images - show/hide level's images number on choose level page.
  • show_videos - show/hide level's videos number on choose level page.

Example

[webdirectory-dashboard]

Works only when frontend submit plugin enabled. Logged in users have an ability to manage their listings, invoices and profile on the frontend dashboard page. This shortcode doesn't have any attributes.

Example

[webdirectory-buttons]

Renders following buttons: submit new listing, my favourites button and these buttons on single listing page: edit listing, print listing, put in/out favourites list, save listing in PDF. This shortcode doesn't have any attributes.

Example

[webdirectory-slider]

Directory listings in slider view.

  • slides - maximum number of slides.
  • max_width - maximum width of slider in pixels, by default it is auto-width.
  • height - height of slider in pixels (default 400).
  • slide_width - maximum width of one slide in pixels (default 150).
  • max_slides - maximum number of slides to be shown in carousel. Slides will be sized up if carousel becomes larger than the original size.
  • order_by_rand - set to order listings randomly (default 0).
  • auto_slides - enable automatic rotating slideshow (default 0).
  • auto_slides_delay - the delay in rotation, in ms (default 3000).

+ attributes from [webdirectory-listings] shortcode, such as: sticky_featured, order_by, order, address, radius, categories, locations, author, related_categories, related_locations, related_tags, levels, post_in, include_categories_children and special content fields filters.

Example