What’s an easy way of sorting custom post types manually?

i used this code to create custom post template for specific post type define(SINGLE_PATH, TEMPLATEPATH.’/single’); function product_single_page_template($product) { global $wp_query, $post; $type = get_post_type(); if ($type==true) if(file_exists(SINGLE_PATH . ‘-type-‘ . $type . ‘.php’)) return SINGLE_PATH . ‘-type-‘ . $type . ‘.php’; return $product; } add_filter(‘single_template’, ‘product_single_page_template’); you can do the same with categories or for … Read more

Order posts by years

i found this code snippet a couple of days ago. can´t remember where… copy this snippet in your archive template <?php $year_prev = null; $months = $wpdb->get_results( “SELECT DISTINCT MONTH( post_date ) AS month , YEAR( post_date ) AS year, COUNT( id ) as post_count FROM $wpdb->posts WHERE post_status=”publish” and post_date <= now( ) and … Read more