CM Answers Experts (CMA) - Shortcodes


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

[cmaexp-dashboard]

Display the dashboard for the regular users, experts and administrators depending on who actually browse the website.

Login Form Attributes

You can show a login form for users that are not logged in.
  • login_form - Show a login form or not for guest users. "0" won't show and "1" will show. Default is "1" (show)
  • login_form_heading_text - Header text of the login form, if it's shown. Default is empty

Example

[cmaexp-dashboard login_form="1" login_form_heading_text="You are not logged in" ]


[cmaexp-categories]

Will show a list of all categories in the system. For each category once clicked will show the list of experts assigned to it. Clicking on the expert will take you to the expert profile.


[cma-get-param-author]

 Returns the value of the "author" parameter from the URL address. For example, if the URL is /custom-user-page/?author=123, the shortcode will return 123.

TIP

You can used this shortcode combined with the [cma-questions] or [cma-answers] shortcodes in order create a custom contributor's page. Example:

[cma-questions author="[cma-get-param-author]"]

[cma-answers author="[cma-get-param-author]"]

[cma-question-form]

This shortcode is related to the base plugin CM Answers - it shows the question form and has a few parameters. In version 4.6.4 of the base CM Answers plugin there was introduced new parameter expert that is related to the version 2.1.1 of the CM Answers Experts Add-on. This parameter predefines the expert that the question will be assigned to. It demands also pre-defining the category of the question using the parameter cat.

Example of using:

[cma-question-form cat="books" expert="12"]

Where "books" is a slug of a category, and "12" - ID of the expert.

Result: The user posts a question, and this question is assigned to the definite category, to the definite expert.


More information about the CM Answers Experts 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.