'projects', ),array( 'hierarchical' => false, 'label' => 'Featured', 'show_ui' => false, 'query_var' => true, 'rewrite' => array('slug' => ''), 'singular_label' => 'Featured post') ); register_taxonomy('clients',array ( 0 => 'projects', ),array( 'hierarchical' => true, 'label' => 'Clients', 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'client', 'with_front' => true ), 'singular_label' => 'Client') ); register_taxonomy('uitingen',array ( 0 => 'projects', ),array( 'hierarchical' => true, 'label' => 'Uitingen', 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'uiting', 'with_front' => true ), 'singular_label' => 'Uiting') ); register_post_type('projects', array( 'label' => 'Projects', 'description' => 'Hieronder vallen alle afgeronde projecten van TRIPP.', 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array( 'slug' => 'project', 'with_front' => true ), 'query_var' => true, 'has_archive' => true, 'menu_position' => 3, 'menu_icon' => get_template_directory_uri().'/images/projects.png', // 16px16 'supports' => array('title','editor','custom-fields','revisions','thumbnail','author',), 'labels' => array ( 'name' => 'Projects', 'singular_name' => 'Project', 'menu_name' => 'Projects', 'add_new' => 'Add Project', 'add_new_item' => 'Add New Project', 'edit' => 'Edit', 'edit_item' => 'Edit Project', 'new_item' => 'New Project', 'view' => 'View Project', 'view_item' => 'View Project', 'search_items' => 'Search Projects', 'not_found' => 'No Projects Found', 'not_found_in_trash' => 'No Projects Found in Trash', 'parent' => 'Parent Project', ),) ); function pagination($prev = '«', $next = '»') { global $wp_query, $wp_rewrite; $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1; $pagination = array( 'base' => @add_query_arg('paged','%#%'), 'format' => '', 'total' => $wp_query->max_num_pages, 'current' => $current, 'prev_text' => __($prev), 'next_text' => __($next), 'type' => 'plain' ); if( $wp_rewrite->using_permalinks() ) $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' ); if( !empty($wp_query->query_vars['s']) ) $pagination['add_args'] = array( 's' => get_query_var( 's' ) ); echo paginate_links( $pagination ); }; ?>