CM Business Directory (CMBD) - Shortcodes

Single Business Shortcodes

Show a widget containing basic information about a single business on any page or post.

  • [cmbd_single_business slug="#"] - to display a single Business. 
  • # - the slug name of the business (the last part of the url)

Directory Shortcodes

Show a directory structure of all related business as determined by the shortcode parameters.

Example 1 - [cmbd_business row_business="3" cats="test" only_relevant="0" tags="tagname" business_ids="1,3,5" exclude_ids="2,4" ]

Example 2 - [cmbd_business cats="single-category"] (this is the shortcode you need to use to display the items only from a single category)

Parameters:

  • view - the ID of the view from the following: tiles, list (defaults to tiles)
  • hidesearch - determines whether to show the search field; value should be 1 or 0
  • hidecategories - determines whether to show the categories filter; value should be 1 or 0
  • hidecustomtaxonomies - determines whether to show the Custom Taxonomy filter; value should be 1 or 0
  • hidetags - determines whether to show the tags filter; value should be 1 or 0
  • hidesearchby - determines whether to show the Search by City/ZIP/State field; value should be 1 or 0
  • row_business - sets the number of businesses in a row (tiles view only)
  • page_business - sets the number of businesses on one page
  • cats - the slug of the category from which the business should be displayed
  • customtax - the slug of the Custom Taxonomy from which the business should be displayed
  • tags - the name of the tag the business should have when displayed
  • only_relevant - use 1 if you would like to only display the categories associated with businesses in the directory; value should be 1 or 0
  • business_ids - determines the IDs of the businesses you want to show in the directory; value should be an ID or comma-separated IDs
  • exclude_ids - determines the IDs of the businesses you want to exclude from displaying in the directory; value should be an ID or comma-separated IDs

Business Page Shortcodes

When constructing a new business page you can use the following shortcodes:

  • [cmbd_categories] - to show the categories and tags box
  • [cmbd_post_title] - to display the post title
  • [cmbd_post_content] - to display post content
  • [cmbd_featured_image] - to display a featured image
  • [cmbd_back_to_index_link] - to display a back link

Category List

  • [cmbd_category_list] - to display a category List
  • Shortcode Attributes:
    • count - determines whether you want to display category elements; value should be 1 or 0
    • columns - sets the number of columns; value should be between 1-6
    • category - displays the list of Category terms; value should be 1 or 0
    • customtax - displays the list of Custom Taxonomy terms; value should be 1 or 0
    • tag - displays the list of Tag terms; value should be 1 or 0
    • hide_empty - determines whether to display categories with posts assigned; value should be 1 or 0

CM Star Rating

  • [cmbd-star-rating] - to display a business' rating
  • Shortcode Attributes:
    • ratingfor - determines whether to show rating for specific post (post ID)
    • disablerating - determines whether to disable rating; use "1" to disable
    • hideaverage - determines whether to hide average note; use "1" to disable
    • hidecount - determines whether to hide ratings count; use "1" to disable

CM Business JS Addon

  • [cmbd_custom_js] - to display custom JavaScript code

More information about the CM Business Directory WordPress Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center