/

CM Business Directory (CMBD) - Shortcodes


Single Business Shortcodes

Back to User Guides


Single Business

  • Shortcode - [cmbd_single_business]
  • Use - Displays a single Business.
  • Parameters
    • slug - the business' slug name (the last part of the URL). This attribute is mandatory - if it's not specified, no business will be shown.
  • Sample  [cmbd_single_business slug="business-1"] 


Want to allow customers to add their own businesses or claim businesses on your Business Directory?

The Business Directory Community add-on makes this easy.

Directory Shortcodes

Shortcode - [cmbd_business] 

Use - Shows a directory structure of all related business as determined by the shortcode parameters. If used without parameters, it will display the main index without filtering based on the Settings.
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
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)


Category List

  • Shortcode - [cmbd_category_list] 
  • Use - Displays a category list
  • Parameters - 
    • 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
  • Samples 
    • [cmbd_category_list] (without parameters):
    • [cmbd_category_list category=0 customtax=0] (set parameters will hide categories and custom taxonomies):

CM Star Rating

  • Shortcode - [cmbd_cm_star_rating]
  • Use - Displays a business' rating
  • Parameters -
    • 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
  • Sample

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