[wp-hackers] Filtering a loop by a custom taxonomy term assignment
David Morris
dvmorris at gmail.com
Thu Oct 21 00:57:27 UTC 2010
That doesn't seem to work for me.
On Wed, Oct 20, 2010 at 7:46 PM, scribu <mail at scribu.net> wrote:
> On Thu, Oct 21, 2010 at 3:31 AM, David Morris <dvmorris at gmail.com> wrote:
>
> > //in functions.php
> >
> > add_action( 'pre_get_posts', 'test_pre_get_posts' );
> > function test_pre_get_posts( $query ) {
> > $query->set('taxonomy','test');
> > $query->set('term','test_term');
> > return $query;
> > }
> >
>
> Try this instead:
>
> function test_pre_get_posts( $query ) {
> $query->set('test', 'test_term');
> }
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
Dave Morris
http://dave.showviz.net/
http://3dcamphouston.com/
More information about the wp-hackers
mailing list