Which shortcodes are available in AnsPress?

[anspress]

This is the main shortcode of AnsPress. It is used to display all AnsPress pages, question list and profile. This can be used in other pages to display questions list or any specific page of AnsPress.

Attributes:

  • categories : Comma separated question category slug. Question category must be installed.
  • tags : Comma separated question tag slug. Question tags must be installed.
  • tax_relation : taxonomy relation. Possible values are ‘AND’, ‘OR’.
  • categories_operator : operator for question_category. Possible values are ‘IN’, ‘NOT IN’, ‘AND’, ‘EXISTS’ and ‘NOT EXISTS’. Default value is ‘IN’.
  • tags_operator : operator for question_tag. Possible values are ‘IN’, ‘NOT IN’, ‘AND’, ‘EXISTS’ and ‘NOT EXISTS’. Default value is ‘IN’.
  • hide_list_head : Hide question list head, i.e. sorting and search.
  • sortby : Short question list by.
  • page : Specific page slug to display.  i.e. ask, users, tags, categories, labels, user/about, etc.

[question]

This shortcode can be used to output a specific question on any WordPress page.

Attributes:

  • id : ID of post (question) to display.

That’s all. There are some more shortcodes under development and we will update when it releases.

5 Comments

  1. what is the shortcode for “ask a question” page ?

    Reply
  2. How to show subcategories in categories page?

    Reply
  3. Why shortcode [anspress pages = "users"] does not work?

    Reply
  4. can i get shortcodes for limit & offset with hide_list_head

    Reply
  5. Examples of shortcode attributes would be very helpful. Thanks.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment