How to order different custom post type in category or tag template page?

someone there help me and solved the problem. It works. Cool. Thks guys. Details : First – I remove this code from function.php function namespace_add_custom_types( $query ) { if( ( is_tag() || is_category() ) && empty( $query->query_vars[‘suppress_filters’] ) ) { $query->set( ‘post_type’, array( ‘post’, ‘projets’, ‘disques’, ‘notices’, ‘main_menu’, ‘top_menu’ )); return $query; } } add_filter( … Read more

Is it possible to have full category-parent/post-name with custom post types? [duplicate]

Add this just below your support (or anywhere inside register_post_type array ) ‘taxonomies’ => array(‘category’, ‘post_tag’). And for 404 error, you miss to add flush_rewrite_rules(); So your final code should look like this /** add_action( ‘init’, ‘create_post_type_othercities’ ); function create_post_type_othercities() { register_post_type( ‘other-cities’, array( ‘labels’ => array( ‘name’ => __( ‘Other Cities’ ), ‘singular_name’ => … Read more

Archive page – problem with pagination

Thanks Pat J I’have got solution now: <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; ?> <?php $offset = ($paged – 1) * 4;?> <?php $kat = get_field(‘kategory’);?> <?php $query = new WP_Query(array(‘offset’ => $offset,’post_type’ => ‘modelki’, ‘taxonomy’ => $kat, ‘posts_per_page’ => ‘4’)); ?>