Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
775 views
in Plugins by
Is there a module that only the guests can see in the theme I use? (such as showing ads only to guests)

Theme: Snow Flat
Q2A version: 1.8.3
by
Like reCaptcha plugin

2 Answers

0 votes
by
i solved this problem. Use to https://github.com/svivian/q2a-widget-anywhere and changed some code.
by
Can you explain which files you have edited
+1 vote
by
edited by

add qa-wa-layer.php

private function wa_output_widget($pos)	{
		foreach ($this->wanyw_widgets as $widget) {
			if ($widget['position'] === $pos )
			{
				if ($widget['ordering'] == 1 && qa_is_logged_in() ) //just guest show
				{					
					$this->output('');
				}
				elseif ($widget['ordering'] == 2 && (qa_get_logged_in_points()>=500 ||  !qa_is_logged_in())) //just point<500 users see
				{					
					$this->output('');
				}
				elseif ($widget['ordering'] == 5 && qa_get_logged_in_points()>999 )
				{					
					$this->output('');
				}
				else
				$this->output($widget['content']);
			}
		}
	}
...