Search filter between promo and exact price

In order to use two or more different meta fields that need to have a relationship bewteen them, you have to provide a value for the relation key. This way you can establish the relationship that must be met for your meta fields. In your specific case, you would use the relation AND to make … Read more

How to get an archive page meta?

From the get_post_meta() function reference, Retrieves a post meta field for the given post ID. The function is inteded to be used with posts (any type), not post type archives. You’ll need to dig into the documentation provided by the plugin author to find out, how to retrieve meta data for a post type archive.

meta_query search names when they have middle initials

The easiest approach in such cases is to set some other custom field which you’ll use for searching. So if the name looks live that: <first_name> <initial> <last_name> Then you can create another field which will contain: <first_name> <initial> <last_name>#<first_name> <last_name>#<last_name> <first_name> (The # character is a separator, so you should use any character that … Read more

Using OR relation in meta_query to check for a value before sorting by another

I think this might be part of the problem in your past query (the second one) array( ‘key’ => ‘end_date’, ‘compare’ => ‘BETWEEN’, ‘type’ => ‘NUMERIC’, ‘value’ => array($past, $now), ), You’re using BETWEEN but I think something like < would be what you want. You don’t want to show events that have ended between … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)