Get post list in same category

Creating a system to load the next post within the same category can indeed be achieved with modifications to your existing code. Here’s how I think you should modify it so it works: // Assuming you have the current post ID stored in $current_post_id $current_post_id = get_the_ID(); // Retrieve the current post ID $current_post_categories = … Read more

query posts only works on the first page

As @Pieter Goosen said, you shouldn’t be using query_posts, nor running your own query. Instead, override the main query that already runs: function wpse_144974_pre_get_posts( $wp_query ) { if ( ! is_admin() && $wp_query->is_main_query() && is_home() ) $wp_query->set( ‘cat’, 1 ); } add_action( ‘pre_get_posts’, ‘wpse_144974_pre_get_posts’ );

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedusedueduedueduedueduedusedus