Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Plugins by
I'm looking for a way to hide the answer (or at least part of it) from unregistered visitors

It only appears after the person has registered
Like all the answers or only the best selected answer?
All answers not just best one

2 Answers

+1 vote

You'll need to check if the user is Logged in/Registered with a  qa_is_logged_in()  statement. If they are, display the content normally, if not, output a message incentivize them to do so.

Open your qa-theme,php file , and paste the following code:

public function a_item_content($a_item)
    if (!isset($a_item['content'])) {
        $a_item['content'] = '';

    $this->output('<div class="qa-a-item-content qa-post-content">');
    if (!qa_is_logged_in()) {
        $this->output('You must <a href="'.qa_path('login').'">Login</a> or <a href="'.qa_path('register').'">Register</a> in order to view this answer!');
    } else {

This assuming you don't have a  a_item_content()  function in this file already. If you have, just make the adjustments based on the code above.

Should look something like this:

I mean you could **visually** obfuscate the content with CSS, But anybody with coding skills would still be able to see the content by inspecting the element.
Yes, that's fine, even if it's only visual.
Can you set up a plugin or something like that to do the job?
I'm willing to pay for it
@Zhao's plugin mentioned on @Bharat's answer pretty much does that job
0 votes

May be this plugin what you needed ?

try it on demo first
What about google?
SE spider can see the answer
i am the plugin author ,you checkout it from github and use it freely