WordPress.org

Ready to get started?Download WordPress

Forums

query_posts with taxonomy forcing post_type = 'any' (2 posts)

  1. Alex Dunae
    Member
    Posted 5 years ago #

    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,

    Alex

  2. ricardom
    Member
    Posted 5 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic