11
votes
4answers
6k views

what is the correct way to compare dates in a WP query_posts meta_query

I have a query_posts call in a WP template. Through the use of the More Fields Plugin I can give the site admin the ability to create an event (custom post type) and then enter a date which is ...
7
votes
2answers
4k views

How do I query by post format in WordPress 3.1

I am trying to query for all posts with a post format of 'quote.' I have added the post formats to my functions.php with add_theme_support( 'post-formats', array( 'image', 'video', 'gallery', 'quote' ...
0
votes
2answers
13k views

Setting posts per page in query_posts

Bear with me here.. The default posts per page in the admin area is 10. During some testing I wanted to change the posts per page for my custom post archive to 2 (in WP 3.1). The problem is that I ...
1
vote
1answer
1k views

How to insert content from another Custom Post type into Post?

Say I have a custom post type called "Performers". This gets populated with different bands/performers. These posts have a featured image as well as custom fields (mp3 file, facebook link, myspace ...
1
vote
1answer
1k views

Query posts by custom post type and custom taxonomy

I am writing a custom loop query to filter through a custom post type and custom taxonomy. I have replaced any variables with static values for the purpose of showing you what result I want. $args = ...
1
vote
2answers
2k views

Query posts by category AND custom field, then ORDERBY another custom field - help!

OK I need to query posts using the following criteria: category_name=office, meta_key=featured_post, meta_value=Yes and order these results using a second custom field which has a numerical value ...
0
votes
2answers
741 views

query_posts meta_key with current date

How to query Post with current date month with custom field: Here is my code <?php global $wp_query; $event_month = get_post_meta($wp_query->post->ID, 'eventdate', true); ...