Custom Post Type query not working
-
<?php $args = array ( 'post_type' => 'artistspage', 'posts_per_page' => 6, 'order' => 'ASC', 'orderby' => 'modified', 'paged' => get_query_var('paged') ); // The Query $wp_query->query( $args ); while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> <div class="thumb-who"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('who-thumb'); ?> </a> <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <p><?php the_excerpt(); ?></p> <a href="<?php the_permalink() ?>" id="read-more" rel="bookmark">Read More ></a> </div> <?php endwhile; wp_pagenavi( array( 'query' => $wp_query ) ); wp_reset_postdata(); // avoid errors further down the page ?>
Give the results on the https://domain.tld/artists/ but 404 error at https://domain.tld/artists/page/2/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom Post Type query not working’ is closed to new replies.