Custom post by current category page <?php global $post; $category = get_queried_object(); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $the_query = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => -1, 'paged' => $paged, 'post_status' => 'publish', 'cat' => $category->term_id, 'orderby' => 'title', 'order' => 'ASC', )); //$loop = new WP_Query( $args ); while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter