[wp-hackers] Filtering a loop by a custom taxonomy term assignment
scribu
mail at scribu.net
Thu Oct 21 01:16:11 UTC 2010
The way you register the taxonomy is also important. I now realize that this
discussion would be more appropriate in the support forums:
http://wordpress.org/support/forum/how-to-and-troubleshooting
On Thu, Oct 21, 2010 at 3:57 AM, David Morris <dvmorris at gmail.com> wrote:
> 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/
> _______________________________________________
> 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