[wp-hackers] Custom Post Type

Dan Larkin nitephire at gmail.com
Mon Jan 28 21:48:38 GMT 2008


Ah, wow.  I feel a bit stupid now.  I forgot to pass $where into my filter
function.  The dump_env showed the query using "WHERE 1=1" which should only
happen when $where is empty, which meant that the $where my function was
returning had to be empty, which didn't make sense.  Okay.  Well, now that
that's fixed, it works great.  Thanks for all the help guys.  Hopefully I
should have pretty much all the info I need to get to work on that plug-in
now.

Dan

On 1/28/08, Austin Matzko <if.website at gmail.com> wrote:
>
> On Jan 28, 2008 4:24 PM, Dan Larkin <nitephire at gmail.com> wrote:
> > Well, the filter is just two lines.  The first is the replacement line,
> now
> > with str_replace instead of eregi_replace (thanks for the speed
> tip).  The
> > second is 'return $where;'.  That's it.  Is there something I'm
> forgetting?
> > Again, I'm new to using hooks.
>
> I tried your example, and it worked fine.
>
> When I can't figure out stuff like this, I activate Ryan Boren's dump
> environment plugin[1].  It will show you the final database query so
> you can see exactly what's going wrong.
>
> [1] http://wordpress.org/extend/plugins/dump_env/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list