Support » Plugins » query_posts with taxonomy forcing post_type = ‘any’

  • I have a plugin that creates a WP taxonomy (for magazine issues).

    I’ve created a convenience function called query_magazine_posts that calls query_posts and passes the taxonomy term.

    function query_magazine_posts ( ... ) {
    	$qs = "orderby=ID&taxonomy=magazine&post_type=post";
    	query_posts( $qs );

    However, post revisions (from WP’s auto-save feature) are being returned in my results. I see in WP_Query that (on line 1199) the post_type is being forced to equal any on taxonomy pages.

    Is this by design and is there any way to exclude records that have post_type = revision?

    Thanks in advance,


Viewing 1 replies (of 1 total)
  • ricardom


    Hi alexdunae,

    I’ve been searching for a plugin to create a new WP taxonomy for magazine issues, but I can’t find anything that really works the way I need.

    I also tried Organize Series and Custom Taxonomies plugins, since they were refered as a solution for my case, but I can’t do anything with them.

    I would like to know if the plugin that you’re using – or something alike – is available for a try somewhere.

    Thanks in advance.

    Best regards,
    Ricardo Mestre

Viewing 1 replies (of 1 total)
  • The topic ‘query_posts with taxonomy forcing post_type = ‘any’’ is closed to new replies.