Custom query_posts() parameter

If you have your data in separate table adding support for it in query is somewhat messy. Basically you will need to filter posts_where and posts_join to modify raw SQL query so that your custom table is joined and checked against your custom values. As per [faster :)] anu’s suggestion it would make sense to … Read more

Query Posts (post meta)

Ok, this is your original meta conditions that describe that you want all posts where key with name from $hideFromHome equals (meta_compare is = by default) true (actually 1 since you concatenate boolean value with string). ‘&meta_key=’ . $hideFromHome .’&meta_value=” . true What you got in second snippet defines key name as pr_hidehome, value as … Read more

Run second query on page based on author of the first query

You can use the $post->post_author, so before your loop add $agent=””; then inside the loop add $agent = $post->post_author; and then create a second query after you loop ends: $agent_query = NEW WP_Query(array(‘post_type’ => ‘agent’, ‘author’ => $agent)); while ($agent_query->have_posts()){ $agent_query->the_post(); //do your agent loop here } wp_reset_postdata();