[wp-hackers] Sidebar/Widget conditionnal tag?

Olivier autremonde75 at gmail.com
Tue Jan 4 21:33:16 UTC 2011


Mike,

Sorry for my misunderstanding :)
In fact I need to get different posts list for the main content loop
and the recent posts widget. So I am hooking on the posts_where filter
to modify the "where" SQL clause to include several different values
for both situations.

The issue is that I have no way to differentiate between the main
content loop and the sidebar widget loop because there is no flag
specific to each. So when my filter applies, it applies to both and
therefore is not efficient because I should have different filters for
both to make this work.

Thanks!


More information about the wp-hackers mailing list