The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
68 views

Sorting past events by month

I have a site that lists upcoming events and past events. In my category-past-event.php template, this is how I've gotten past events appear in descending order (from most recent to oldest): ...
1
vote
1answer
106 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 ...
1
vote
1answer
460 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
21 views

How to output meta_key in wp_postmeta?

I have a meta_key in wp_postmeta called _su_description. How do I output its value?
0
votes
1answer
277 views

Query multiple meta values

I'm working on a 'checkbox filter' to query posts by checked values. See this link (EDIT: As you can see there are just 2 posts in this link, as soon as the user checks for 'MINI' it gets a good ...
0
votes
1answer
270 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
92 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
101 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
95 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
58 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
599 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 ...
2
votes
0answers
95 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
323 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
55 views

Wordpress Admin Panel Search posts with custom post meta values along with title

Trying to modify default admin search by including search by custom post type fields, Below is my code, function custom_search_query( $query ) { $custom_fields = array( // put all the meta ...
0
votes
0answers
46 views

How to filter a meta key with the meta values?

I have a custom post type wich I'd like to filter on a meta value. I already can sort the meta values from a meta key with the following code: // Register the column function status_column_register( ...
0
votes
0answers
53 views

How to order query by meta value added date

I have a movie trailers website. There are usually two or three trailers on the same page for a movie. I add trailer urls using multiple custom fields. When there is a second or third trailer I simply ...
0
votes
0answers
82 views

Custom Field: Display only if a specific key is selected outside the loop

I might be doing this all wrong. I have a custom field called "enable_adsense" and the value can be either "yes" or "no" What I'm trying to do is display something if the value is "yes" and something ...
0
votes
0answers
57 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
192 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 ...