Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
472 views
in Plugins by
I want to create a widget which displays content only on question pages. Anybody knows how to do this?

2 Answers

0 votes
by
Hi,

You can use the conditional template tag:

    if ($this->template == 'question') {

    }

Add that around your widget-code.
0 votes
by
Oh btw, forget my previous answer, use this in your plugin code:

        function allow_template($template)
        {
            return ($template=='question');
        }

See other plugins for different example uses.
...