CM Product Directory (CMPD) - Shortcodes

Shortcodes

Single Product Shortcode

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

  • [cmpd_single_prodct slug="#"] - display single Product. # - the slug name of the product (the last part of the url)

Directory Shortcode

Show a directory structure of all related prodct which are related to the shortcode params.

Product Directory Shortcode Example - [cmpd_product row_product="3" cats="1" only_relevant="0" tags="tagname" product_ids="1,3,5" exclude_ids="2,4" ]

  • view - the id of the view from the following: tiles, list(defaults to: tiles)
  • filter_search - whether to hide Search filter on Products Index Page ( set 1 to hide )
  • filter_category - whether to hide Categories filter on Products Index Page ( set 1 to hide )
  • filter_pricingmodel - whether to hide Pricing Model filter on Products Index Page ( set 1 to hide )
  • filter_languagesupport - whether to hide Language Support filter on Products Index Page ( set 1 to hide )
  • filter_targetaudience - whether to hide Target Audience filter on Products Index Page ( set 1 to hide )
  • filter_tag - whether to hide Tags filter on Products Index Page ( set 1 to hide )
  • row_product - number of the product in the row (tiles view only)
  • page_product - number of the product on one page
  • cats - the slug of the catagory from which the product should be displayed
  • pricingmodels - the slug of additional category from which the product should be displayed
  • langsupports - the slug of additional category from which the product should be displayed
  • targetaudiences - the slug of additional category from which the product should be displayed
  • tags - the name of the tag the product displayed should have
  • only_relevant - use 1 if you like only to display the categories associated with products in the directory. Value should be 1 or 0
  • product_ids - the IDs of the product you only want to show in directory. Value should be an ID, or comma separated IDs.
  • exclude_ids - the IDs of the product you want to exclude from displaying in directory. Value should be an ID, or comma separated IDs.

Shortcode Used on the Product Page Template

Once constructing a new prodct page you can use the following shortcode.

  • [cmpd_categories] - shows the categories and tags box
  • [cmpd_post_title] - display post title
  • [cmpd_post_content] - display post content
  • [cmpd_featured_image] - display featured image
  • [cmpd_back_to_index_link]- display backlink

Category List

  • [cmpd_category_list] - display Category List
  • Shortcode Attributes:
    • count - Whether you want to display category elements (1/0)
    • columns - Number of columns (1-6)
    • category - Display list of Category terms (1/0)
    • pricingmodel - Display list of Pricing Model terms (1/0)
    • languagesupport - Display list of Language Support terms (1/0)
    • targetaudience - Display list of Target Audience terms (1/0)
    • tag - Display list of Tag terms (1/0)
    • hide_empty - Whether to display categories with posts assigned (1/0)

CM Star Rating

  • [cmpd-star-rating] - display rating
  • Shortcode Attributes:
    • ratingfor - whether to show rating for specific post (post ID)
    • disablerating - whether to disable rating ("1" to disable)
    • hideaverage - whether to hide average note ("1" to disable)
    • hidecount - whether to hide ratings count ("1" to disable)


More information about the CM Product 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