Custom Post type & Taxonomy 404

Please replace the “portfolio_create_taxonomy” funcation to below code function portfolio_create_taxonomy() { register_taxonomy( ‘portfolio-category’, array( ‘portfolio’ ), array( ‘hierarchical’ => true, ‘show_ui’ => true, ‘show_admin_column’ => true, ‘query_var’ => true, ‘label’ => __( ‘Category’ ), ‘rewrite’ => array( ‘slug’ => ‘portfolio-category’ ), ‘hierarchical’ => true, ) ); } add_action( ‘init’, ‘portfolio_create_taxonomy’ );

multiple custom post type on category page

Add to $post_type array, don’t replace it… function dog_query_post_type($query) { if( is_category() && $query->is_main_query() && empty( $query->query_vars[‘suppress_filters’] ) ) { $post_type = get_query_var(‘post_type’); if($post_type) $post_type[] = ‘dog’; else $post_type = array( ‘post’, ‘dog’, ‘nav_menu_item’); $query->set(‘post_type’,$post_type); return $query; } } add_filter(‘pre_get_posts’, ‘dog_query_post_type’);

Pagination Not Working on `WP_Query` Archive Page

Note that with a custom WP_Query class instance like the $homePageArticles in your case, you should pass the max_num_pages property of the class instance to paginate_links(): paginate_links( array( ‘total’ => $homePageArticles->max_num_pages, ) ) However, that alone will not work with custom offset which breaks the pagination, hence for example you got this issue: it just … Read more

Paginated Archives or Loop by Month

I think this is not very hard to do. If you have currently have paginated date-based archives you can just disable paging when you are in a month overview: add_action( ‘pre_get_posts’, ‘wpse12983_pre_get_posts’ ); function wpse12983_pre_get_posts( &$wp_query ) { if ( $wp_query->is_month() ) { $wp_query->set( ‘nopaging’, true ); } } You can use get_month_link() to get … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)