Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

tax-query

Multiple tax_queries: display posts titles from several custom taxonomie

Multiple tax_queries: display posts titles from several custom taxonomie

Categories wp-query Tags tax-query, wp-query

WP_Query: Meta_Query with serialized value (or a workaround)

WP_Query: Meta_Query with serialized value (or a workaround)

Categories wp-query Tags array, tax-query, wp-query

Custom query for tag and custom tag from 2 post type

Custom query for tag and custom tag from 2 post type

Categories wp-query Tags custom-taxonomy, query, tax-query, wp-query

Empty ‘terms’ in ‘tax_query’ returns an empty array

Empty ‘terms’ in ‘tax_query’ returns an empty array

Categories wp-query Tags tax-query, taxonomy, wp-query

Extending WP Query: Custom geolocation meta values work, but tax_query breaks

I’ve discovered a solution. I don’t know if it’s the best solution, but it does work. GROUP BY wp_posts.ID was causing my query to error out. I don’t quite understand why. In theory, my query should be returning duplicate posts without it… but it’s not. So, I’m going to push this code live as it … Read more

Categories wp-query Tags geo-data, meta-query, tax-query, wp-query

Escaping WP_Query tax_query when term has special character(s)

I’m not sure if this is a bug, but it need further investigation. I’ve run a few quick tests on the name field in a tax_query, and whenever a term name has got a special character or have more than one word, the tax_query is excluded from the SQL query TEST 1 I have use … Read more

Categories wp-query Tags escaping, sanitization, tax-query, wp-query

Query breaking with ‘posts_per_page’ => -1

Query breaking with ‘posts_per_page’ => -1

Categories custom-post-types Tags custom-post-types, tax-query, wp-query

tax_query not working for taxonomy slug

I can’t comment so I have to provide an answer which I don’t have a full answer. If I were you I would print_r($slug) and see what it gives you. The $slug variable is most likely not in a format that ‘terms’ can accept.

Categories wp-query Tags custom-taxonomy, tax-query, wp-query

Custom taxonomy and query multi conditions

Let’s say you have 5 instances: 200, 201, 202, 203, 204 NOT IN {200, 201, 202} is equal to IN {203, 204} (all the other instances). So you don’t need your IN operator anymore because its results are already included from using the NOT IN operator. In your case, this logic works assuming an article … Read more

Categories wp-query Tags multi-taxonomy-query, tax-query, taxonomy, wp-query

How to combine nested tax_query logic with other nested query logic?

How to combine nested tax_query logic with other nested query logic?

Categories wp-query Tags custom-taxonomy, tax-query, wp-query
Older posts
Newer posts
← Previous Page1 … Page3 Page4 Page5 … Page28 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress