I already created a wordpress widget for adding some featured from admin panel.I need to redirect to another page from this widget.But,when i am try to use header() method which shows a warning some thing like header already send by output....an do on.Is there any other method to redirect from wordpress widget?Please help me
A:
There are several actions you could hook onto, most useful probably "init" or "widgets_init". Both are run before any output is printed, so you can redirect from those.
For a list of actions, see http://codex.wordpress.org/Plugin_API/Action_Reference
Example:
<?php add_action('widgets_init', 'my_redirect_function'); ?>
Jakob Kruse
2010-04-26 06:31:00