[wp-hackers] Sidebar/Widget conditionnal tag?

Olivier autremonde75 at gmail.com
Wed Jan 5 09:46:04 UTC 2011


Thanks for your hints Philip and Mike!

I think the easiest is probably to add a specific filter on widget
creation (widgets_init potentially). Then when the query happens for
the widget, it will use this specific filter. Now the trick is to
remove it after all widgets have been created in order to avoid any
side effect on the main content loop but not after the first
widget(thus an early removal isn't possible). Not sure if there is any
sidebar end action.


More information about the wp-hackers mailing list