CM Answers Experts (CMA) - Shortcodes
TIP: What Are Shortcodes
Shortcodes add dynamic content to your site via a small piece of code. Learn more: Shortcodes - How To Use
Display the dashboard for the regular users, experts and administrators depending on who actually browse the website.
Login Form AttributesYou 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
[cmaexp-dashboard login_form="1" login_form_heading_text="You are not logged in" ]
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.
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.
You can used this shortcode combined with the [cma-questions] or [cma-answers] shortcodes in order create a custom contributor's page. Example:
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.