The way you query for Taxonomy is deprecated, see the reference in the Codex: http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters
So instead of
'taxonomy'=> $taxonomy,
you should use this:
'tax_query' => array(
array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $section->slug
)
)
And make sure that $taxonomy is defined!
Related Posts:
- Retrieve posts by term id custom query
- Display category posts grouped by taxonomy
- restrict_manage_posts not working in 3.3.1
- Filter all queries with a specific taxonomy
- wp_query orderby title and meta key value (WP3.1)
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- Taxonomy.php issue with search and filters
- How to List Parent Term Links for Custom Taxonomy With & Without Children?
- Recreating the hierarchy of taxonomies for a dropdown form menu?
- Custom taxonomy query not working with switch_to_blog
- $wpdb query a post type within a specific taxonomy term while ordering posts by custom meta value?
- Print terms with taxonomy and metabox value
- Checkbox onclick filtering on the same page
- A way to query custom taxonomies by name
- get the taxonomies terms associated with users
- Rewrite Rules returning wrong data
- Sorting main query by custom taxonomy slug
- WordPress Custom post query sorting does not work
- List related terms + taxonomies
- Search Query for Multiple Terms In Same Taxonomy
- Exclude taxonomy term from all loops, but having it on widget
- Get list of taxonomies associated with users
- query_posts that have custom taxonomy and limiting what shows based on the taxonomy
- Several taxonomy query (like filter)
- Taxonomy archive template that shows posts from more than one taxonomy
- how to access the $query variable inside taxonomy-xxx.php template file?
- Update Custom Taxonomy Value for a post based on custom date field
- Get 1st parent category id from post
- How to get the term description in a taxonomy term archive query?
- making an index from custom taxonomies and tags of posts (not hierarchical taxonomy)
- Query Multiple Custom Taxonomies
- Query by multiple custom taxonomies
- WP Query : strange behaviour with multiple no-hierarchical tax
- WordPress search form and search result through ACF field in custom taxonomy
- Query pages by child term
- Can I use multi (sub) levels of relation (AND | OR) on custom query?
- Tax Query not working
- Custom taxonomy – query returns an error
- How to perform a search inside a specific taxonomy category
- Adding a query var to taxonomy term archive – gets redirected to the other taxonomy archive page
- add_query_arg to look up page title
- Can I use $query->set() (in a pre_get_posts() hook) with a custom taxonomy in WP 3?
- How can I query for all values of a custom taxonomies?
- query grandchildren taxonomy terms
- Custom columns on edit-tags.php main page
- Is it possible to use one slug for Multiple Taxonomies?
- Display one post from each term in a custom taxonomy [closed]
- Is it possible to add taxonomies to user profiles?
- Get terms from multiple taxonomies
- get_terms showing link to category even if all posts are drafts
- How to restrict on selecting child taxonomy
- Is it possible to sort the post based on a custom field?
- How do I get terms as a list for a specific post?
- Separator for multiple terms
- How get custom field from custom taxonomy?
- What are terms and taxonomy, how they related to post and how these three are stored in database?
- Get multiple term objects by ids
- Echo custom taxonomy term name
- Move terms from one taxonomy to another keeping the hierarchy
- How can I get WP to build a feed based on multiple taxonomy terms
- Getting the selected terms for custom taxonomies in the editor
- Set custom post type terms by id without knowing taxonomy
- Catchable fatal error on custom category post
- How to add contents of a custom field to a taxonomy term list?
- Google Map Shortcode for Custom Taxonomy/Post Types
- How to target parent product category and its children using WooCommerce?
- Custom Taxonomies not retaining hierarchy while importing from one site to another
- Remove custom taxonomy column from my custom post type columns
- Output single post custom taxonomy child terms
- Check if custom taxonomy has posts with get_categories()
- Terms Per Page in custom taxonomy Admin
- How to get list of only custom taxonomies?
- Show single Child Category on Custom Post
- search using multiple taxonomies and keyword
- Need equivalent of single_term_slug
- Multiple Drop-Down custom taxonomies search
- How to divide Subcategories into pages of parent category wordpress
- Issue adding custom taxonomies to custom post type (PHP)
- Taxonomy URL rewrite whilst keeping filtered posts?
- Displaying all posts by category and showing content on click
- How to loop custom posts that have an exact match in taxonomy terms?
- True or F False Setting of ‘with_front’ Parameter of Rewrite Is returning Exact Same result
- wp_insert_post not adding taxonomy (using wp_set_object_terms)
- Filter “get_terms” query
- generate random slug when adding taxonomy
- Custom Taxonomy – Dropdown
- Error 404 in Custom taxonomy with pagination
- WordPress Taxonomy Permalinks – Custom?
- Need help understanding a rewrite with multi-level taxonomy
- Attaching meta box to specific category/taxonomy in custom post type
- Change Permalink to Value of Custom Field
- Display custom post taxonomies
- Gravity prerender taxonomy [closed]
- Custom Taxonomy type in nav menu
- Advanced search: roles and multiple taxonomies
- One taxonomy template for all categories?
- Removing fields from category/taxonomy edit form
- Remove ‘portfolio’ from URL
- Rewrite URL for a specific taxonomy [duplicate]
- Template hierarchy html with taxonomy in 6.2