AnsPress shortcode

This post was moved to: Which shortcodes are available in AnsPress?    

Change default AnsPress user page

Below code will change default user page as about page instead of activity feed.

Add Syntax Highlighter in AnsPress

By default AnsPress sanitize and preserve code in question and answer, but code button and syntax highlighter is not there by default. To get this enabled you have to follow below steps.

Add custom field in AnsPress ask form

AnsPress form and fields are customizable and can be easily overridden. I have written a sample gist to illustrate. This code was written for 3.0.0-alpha.1, it can be downloaded from here: AnsPress Github repo

Remove flag link from anspress question and answer

If your site is private or for any reason there is no use of flag functionality then you can add below code to you theme function.php to remove flag link. Also, if you are using our theme then make sure to create a child theme and paste this code in child-theme function.php.