try changing the value of
'posts_per_page' => '-1'
this is what’s probably messing up your query,
if you want two try setting it to :
'posts_per_page' => '2'
also try to comment it out…..
I think it’s quite self-explanatory,
but to really understand wp-query read the Codex ref..
Related Posts:
- Taxonomy, Terms, and Template Files
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- Templates for Custom Post Types and Custom Taxonomies
- Get page by template?
- Custom taxonomy query for a custom post type
- Need some templating advice for templating with custom post types and taxonomies
- Custom Post Type with Nested Taxonomy and Template Files
- Custom Post Type Archive Template
- custom post type archive template per custom taxonomy term
- custom taxonomy – Template not working
- Include different loop templates in search query
- Create separate template for shared custom taxonomy with shared terms
- Trying to manage templates on a blog with lots of custom taxonomies
- How do I provide a “show all posts” link in a paginated term archive?
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Query with no terms uses index.php template instead of archive.php
- Create template for taxonomy results limited by Custom Post Type
- Template for custom post with custom taxonomy
- Custom taxonomy and custom post type – wrong permalinks and template
- WordPress Doesn’t Generate Taxonomy Archive
- Custom taxonomy returns 404
- Template for all categories of a custom post type?
- Migrating a taxonomy’s tags to the native category
- WordPress custom taxonomy template not working
- How can I get this request to use the Custom Post Type page template instead?
- Archive for a Taxonomy of a Custom Post type
- Template files for Custom Post Type and Taxonomy
- Main query not querying any posts in custom taxonomy template
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- Which file/template is in charge of taxonomies for custom post types?
- How to get_term_meta on single custom post?
- Get template part with CPT and Custom Taxonomy conditionals
- How to create a template to show child terms of a MAIN taxonomy
- How to change single custom post template by custom taxonomy?
- Create a custom taxonomy template that loops through child categories in term order?
- Post template with breadcrumb needs to show page navigated from
- Custom Post Taxonomy Template Not Loading Properly
- taxonomy – templates are not loading
- Custom taxonomy with custom post type template not showing
- Custom taxonomy template for custom fields loop [closed]
- Templates for CPT not working
- Single taxonomy for different custom post types
- How should i name the .php file to show custom posts under a taxonomy’s term?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Custom Post Type tag taxonomy “Page Not Found”
- template structure for CPT not clear
- WordPress Custom taxonomy template
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Querying multiple taxonomies in URL leads to wrong taxonomy archive
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Get The Post Type A Taxonomy Is Attached To
- Shouldn’t this be easy?! Custom post type/custom taxonomy permalink
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Two Custom Post Types, Share Two Taxonomies
- How to list/show all custom post types regardless of category?
- Querying Posts by Taxonomy From Alternate Network Site
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Permalinks when filtering multiple custom post types by single taxonomy
- Filter custom post type archive page with custom taxonomies (categories) with AJAX
- How-to leverage WordPress for creating Extended Social Profiles
- How To Create A Custom Taxonomy 404 Page
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Query Multiple Taxominies Across Multiple Post type’s
- Custom Post hierarchical to custom taxonomy
- Specific query for custom post type
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- Disable custom taxonomy on admin bar
- how to show records that don’t have custom meta value
- how to get this tax_query working?
- Add term slug in URL of custom post type details page
- Custom post type and custom taxonomy 404 on page 2
- Ideas on how to organize a project [closed]
- How should I structure complex content hierarchies?
- Querying two different post types with the same taxonomony
- Convert Custom Taxonomy Posts to Normal Posts
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- set object terms after some some time of published post – functions.php
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Posts per Page on custom Taxonomy Template
- Set up Custom Taxonomy Archive Template File To Cover 3 Categories
- Custom fields for taxonomies with custom value for each post
- Custom Post Type / Taxonomy / Term – what template to use to avoid 404-page?
- If custom taxonomy exist on post?
- Pagination not working (page/2 retunring 404 page)
- WordPress add taxonomies/terms list as a menu in archive page
- How to add base permalink to custom posts?
- Add different meta box based on taxonomy
- Search page for custom post type
- insert a taxonomy for a custom post type
- Advanced Custom Fields: query posts filtered by multiple field values
- Issue on adding Icons to Custom Post Type
- Query a custom taxonomy for certain posts
- Add /blog to the “post” post type url
- Navigation links to posts in current term shortcode
- Display ONLY ONE $term (Out of 4 terms) from a Custom Taxonomy and CPT
- the_post_navigation in single page with multiple taxonomies
- Url rewrite with custom post type and taxonomy