Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

meta-query

Meta_query compare operator explanation

August 4, 2022August 3, 2022 by Magenaut

I noticed that there are bunch of operator can be use for compare in meta_query.
However, I am not quite sure what operator I should use, it is somehow confusing like = and LIKE operator.

Categories Q&A, Wordpress Tags meta-query, wp-query Leave a comment

How can I create a meta_query with an array as meta_field?

August 4, 2022August 3, 2022 by Magenaut

Here are the args for my query :

Categories Q&A, Wordpress Tags meta-query, query Leave a comment

Using meta query (‘meta_query’) with a search query (‘s’)

August 4, 2022August 3, 2022 by Magenaut

Trying to build a search that not only searches the defaults (title, content etc) but also a specific custom field.

Categories Q&A, Wordpress Tags custom-field, meta-query, search Leave a comment

Query WP REST API v2 by multiple meta keys

August 4, 2022August 3, 2022 by Magenaut

Using v2 of the REST API, I’m wanting to query some posts by multiple meta keys. With v1 I was able to format the url like &filter[meta_value][month]=12&[meta_value][year]=2015 and it worked (after exposing the meta values to the API).

Categories Q&A, Wordpress Tags api, filters, meta-query, rest-api, wp-api Leave a comment

How to query posts based on lat-lng coordinate as post meta?

August 4, 2022August 3, 2022 by Magenaut

I’m planning a custom WordPress theme where the Custom Post Type (CPT) will have latitude and longitude coordinate as it’s meta value. The latitude and longitude will be displayed as a Marker in a Google Map.

Categories Q&A, Wordpress Tags google-maps, meta-query, wp-query Leave a comment

Meta query with string starting like pattern

August 4, 2022August 3, 2022 by Magenaut

I have a custom WP_Query with the following meta_query:

Categories Q&A, Wordpress Tags custom-field, meta-query, wp-query Leave a comment

filter search result with custom post type meta key

August 4, 2022August 3, 2022 by Magenaut

The default search returns all post types, which is what I want. But for one specific custom post type I want to limit the result to a specific meta key value (a custom date that must be greater than today).

Categories Q&A, Wordpress Tags custom-post-types, meta-query, pre-get-posts, search Leave a comment

How to do a meta query using REST-API in WordPress 4.7+?

August 3, 2022August 2, 2022 by Magenaut

I am trying to filter by a meta query but no matter what I try I can not make it work.

Categories Q&A, Wordpress Tags meta-query, rest-api Leave a comment

Nested meta_query with multiple relation keys

August 3, 2022August 2, 2022 by Magenaut

I am curious whether WordPress is able to run nested meta_query, with each having different relation keys? As of WordPress 3.0, tax_query is able to perform this function; I’m wondering whether this has an equivalent with meta_query.

Categories Q&A, Wordpress Tags customization, meta-query, query-posts, tax-query, wp-query Leave a comment

WP_Query with checkbox meta_query

August 3, 2022August 2, 2022 by Magenaut

I have posted this on StackOverflow too, not sure if that’s allowed – if not let me know and I’ll remove one (I don’t want to look like I’m spamming). Anyway….

Categories Q&A, Wordpress Tags meta-query, metabox, wp-query Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress