Question

I would like to query posts from a taxonomy created by a plugin (WP Business Directory Manager). How would I do this? I want the query to create html listing of the posts and allow me to list a certain amount, show the associated image to the posts, and a small excerpt.

Some examples on wp stack exchange seem like they would help, but might be different in my case. Thanks a lot.

Was it helpful?

Solution

To query by taxonomy you need to know its query_var that is used in its register_taxonomy() call. It defaults to taxonomy name so usually equal to that.

Then you use that info in query argument:

query_posts( array( 'query_var' => 'term' ) );

See Querying by taxonomy in Codex.

It is hard to suggest more without specifics of your taxonomy and where you need it done (template, standalone function, etc).

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top