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
Leave a Reply
You must be logged in to post a comment.
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: