__( 'CCO Edition', 'ccoarchive' ), 'all_items' => __( 'All CCO Editions', 'ccoarchive' ), 'add_new_item' => __( 'Add New CCO Edition', 'ccoarchive' ), 'edit_item' => __( 'Edit Edition', 'ccoarchive' ), 'new_item' => __( 'New CCO Edition', 'ccoarchive' ), 'view_item' => __( 'View Edition', 'ccoarchive' ), 'search_item' => __( 'Search CCO Editions', 'ccoarchive' ), 'not_found' => __( 'No CCO Editions found', 'ccoarchive' ), 'not_found_in_trash' => __( 'No CCO Editions found in trash', 'ccoarchive' ), ); $args = array( 'label' => __( 'CCO Archive', 'ccoarchive' ), 'labels' => $labels, 'public' => true, 'menu_position' => 5, 'supports' => array( 'title', 'author', 'thumbnail', 'revisions', ), 'taxonomies' => array( 'category', 'post-tag' ), 'has_archive' => true, 'rewrite' => array( 'slug' => 'ccoarchive/edition', 'with_front' => false, ), ); register_post_type( 'ccoarchive_post', $args ); } /** * Fire the register function on WP init */ add_action( 'init', 'ccoarchive_register_cpt' ); /** * Create, format and output the CCO edition archive listing */ function ccoarchive_gen_table() { //Build the argument list for the query $args = array( 'post_type' => 'ccoarchive_post', 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'DESC' ); //Reset default query and create a new one with arg $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query($args); //Only do something if there's actually CCO editions to act on if($wp_query->have_posts()) { //Set up the container row $cco_output .= '