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.

How to disable AnsPress user profile

You can follow this instructions if you are trying to disable default AnsPress user profile. This option is helpful when you site is already using any other profile plugin or you just don’t want to use it. I am writing a simple instructions for disabling profile. Below code will tell AnsPress not to load its profile. You can simply copy and paste shorter version to your theme function.php.