Você tem que fazer isso via WP_Query.
See more in: https://codex.wordpress.org/Class_Reference/WP_Query
Ou faz assim:
<?php
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'sketchs',
'posts_per_page' => '20',
'paged' => $paged,
'order' => 'DESC',
'orderby' => 'date'
);
$query = new WP_Query($args);
if ( $query -> have_posts() ){
while ( $query -> have_posts() ){
$query -> the_post();
echo the_title();
echo the_content();
}
}else{
echo "Do Something...";
}
wp_reset_postdata();
?>
Ai o CSS é com vc.
A forma que uso é assim:
functions.php
<?php
add_action('init', 'wp_init');
function wp_init() {
nomecustom_register_post_types();
}
function nomecustom_register_post_types() {
register_post_type('nomecustom',
array(
'labels' => array(
'name' => 'Nomes',
'singular_name' => 'Nome',
'add_new' => 'Adicionar Nome',
'edit_item' => 'Editar Nome'
),
'public' => true,
'has_archive' => true,
'supports' => array('title', 'editor', 'thumbnail')
)
);
}
loop.php
<?php
$nomecustom = new WP_Query(
array(
'post_type' => 'nomecustom',
'posts_per_page' => 100
)
);
while( $nomecustom->have_posts() ) : $nomecustom->the_post();
?>
post
<?php endwhile; ?>