CM Business Directory (CMBD) - Shortcodes


Single Business Shortcodes

Back to User Guides

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code. Learn more: Shortcodes - How To Use


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.
  • Example

      [cmbd_single_business slug="business-1"] 


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 displayedonly_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
  • Samples 
    • [cmbd_business row_business="3" cats="test" only_relevant="0" tags="tagname" business_ids="1,3,5" exclude_ids="2,4" ]
    • [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):


Use: Displays search box

Shortcode: [cmpd_business_searchbox]

Attributes:

  • placeholder_text - text to be shown as default in search box

Example

  [cmbd_business_searchbox placeholder_text="Search"]


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

Example


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
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.