Skip to content

Fix custom taxonomy query structure in build_query_args method#23

Merged
wpscholar merged 1 commit into
mainfrom
fix-custom-taxonomy-query
Jun 3, 2025
Merged

Fix custom taxonomy query structure in build_query_args method#23
wpscholar merged 1 commit into
mainfrom
fix-custom-taxonomy-query

Conversation

@wpscholar

@wpscholar wpscholar commented Jun 3, 2025

Copy link
Copy Markdown
Member

Summary

  • Fixed a bug in the method where custom taxonomy queries were not structured correctly for WP_Query
  • The parameter requires an array of arrays, and was previously implemented as a flat array
  • Added a new unit test to verify the proper structure for custom taxonomy queries

Test plan

  1. Run the unit tests to verify the proper query structure
  2. Test the shortcode with a custom taxonomy filter to confirm posts are filtered correctly

🤖 Generated with Claude Code

The tax_query argument for WP_Query requires an array of arrays, not a flat array.
Added unit test to verify proper structure for custom taxonomy queries.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@wpscholar wpscholar merged commit a8aba0e into main Jun 3, 2025
55 of 57 checks passed
@wpscholar wpscholar deleted the fix-custom-taxonomy-query branch June 3, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant