[wp-hackers] Filtering a loop by a custom taxonomy term assignment
David Morris
dvmorris at gmail.com
Thu Oct 21 01:32:19 UTC 2010
http://wordpress.org/support/topic/filtering-a-loop-by-a-custom-taxonomy-term-assignment?replies=1#post-1749685
On Wed, Oct 20, 2010 at 8:16 PM, scribu <mail at scribu.net> wrote:
> 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
> >
> _______________________________________________
> 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