Query pulling a single post per month

Maybe a bit less hacky: $months = array(); while(….){ list($month, $year) = explode(“https://wordpress.stackexchange.com/”, get_the_date(‘n/y’)); // eg. 7/11 if(in_array($month, $months)) continue; // skip $months[] = $month; echo ‘<li><a href=”‘.get_month_link($month, $year).'”>’.get_the_date(‘F Y’).'</a></li>’; } If you’re only getting 6 posts and you don’t need pagination that I guess it’s OK to go this way. Otherwise you need to … Read more

make a dropdown custom field with ‘cities’ list in it

You can register custom taxonomy like so: <?php // Register custom taxonomy for locations function mamaduka_register_taxonomy_location() { register_taxonomy( ‘location’, array( ‘post’ ), array( ‘hierarchical’ => true, ‘label’ => ‘Locations’, ‘public’ => true, )); } add_action( ‘init’, ‘mamaduka_register_taxonomy_location’ ); ?> for more information about custom taxonomy see Codex: http://codex.wordpress.org/Function_Reference/register_taxonomy

Order by custom date field

I found the following solution: SELECT wposts . * FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = ‘datum’ AND wposts.post_type=”optredens” AND wposts.post_status=”publish” ORDER BY wpostmeta.meta_value ASC As other query_posts() methods / alternatives did not work very well.