The meta-value tag has no wiki summary.
1
vote
1answer
151 views
WP_Query - filter by multiple meta values and order by other meta values
I'm trying to query posts using WP_Query and meta_query parameters:
$args = array(
'post_type' => 'produkty',
'meta_query' => array(
'relation' => 'AND',
...
1
vote
1answer
82 views
Custom order for Mysql array
I have a Page of Posts, each post has a Custom Field "expired" which contains a date in the format YYYY-MM-DD which is used to order the posts. This date is used for a script that tells the visitor if ...
0
votes
1answer
30 views
AJAX pagination call to get_posts with an offset and a meta_value_num sort returns same post on adjacent pages
I have a simple AJAX pagination that seemed to work just fine, calling one Wordpress page (not ideal, I know) with a pagenum and a sort order arguments and it returned 4 custom posts per call. The ...
0
votes
1answer
51 views
Saving zero as meta value
I have a meta_key called "_ordre" and each time I create a new custom post, a new meta_value is set for that meta_key.
The thing is, when I set the value of '_ordre' to 0, the meta_value is not saved ...
0
votes
1answer
58 views
Order by meta_key where value is serialized
I'd order post by meta_key but i've a problem with meta_value because is serialized object.
I'd order my post per count value.
a:2:{s:5:"count";d:9750;s:7:"timeout";i:1358466733;}
I use below code ...
0
votes
1answer
70 views
Problem with meta_value order after update
I use following array and works fine...
sort post by meta_key where value of t_count is a number:
$args = array(
'posts_per_page' => 10,
'meta_key' => 't_count',
'orderby' => ...
0
votes
1answer
53 views
Order by meta values
I have 3 meta fields related to dates:
year = 2012
release_date = 14 November 2012
release_date_db = 20121114
I need to show the posts from year 2012 sorted by release_date.
I made this:
...
0
votes
1answer
327 views
How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?
I know the question is quite ambiguous. Let me explain:
I have a page that lists all posts with a certain value of a custom field.
(Eg.: The page Rentals lists all posts with the value rental of ...
0
votes
1answer
362 views
Custom WP Query from meta_value stored as serialised array
I'm using a Magic Fields 2 multicheck box to store Services which can be assigned to Case Studies. The data is stored as a serialised array in WordPress, and I need some help to extract the "related ...
1
vote
0answers
49 views
Is it possible to orderby multiple meta_keys when using meta_value_num?
Reading through the order & orderby documentation, it's not clear to me whether there is any support to order based on multiple meta_key values.
Obviously, using meta_query I can return posts ...
1
vote
0answers
182 views
How to use Meta Value Compare in WP_Query For Max and Min numbers
I am using WP_Query for visitor to filter the posts. The posts is about products. So in the filter, it has a field where user can select Maximum price and Minimum price. (Just like most of the ...
0
votes
0answers
23 views
Sort by user meta data
I am using the plugin: ep-display-user and can't get it to sort by meta. This is my code:
function epdu_get_users($visible){
$user_ids = $this->wpdb->get_col("SELECT ID FROM $this->table ...
0
votes
0answers
39 views
Check if meta_key exists in wp_list_pages
I have added a custom field (using Advanced Custom Fields plugin) to a page allowing you to show/hide it with a simple checkbox, i want to filter out these pages if a user is not logged in so i am ...
0
votes
0answers
20 views
How make a link to meta_key for all meta_value
I have a meta_key = 'company', where meta_value = name of the company that introduces the user to order form.
Then these companies appear on the publication page (index-job.php).
How make a link the ...