How do I display specific custom posts, and how do I edit a post’s singular page?

Custom post types don’t need a template created for them. They will automatically use the archive.php and single.php of your theme. If you want to customize a page so that your portfolio and your regular blogs are different then you need to create 2 files. archive-postname.php (in this case it’s whatever you named your post … Read more

How to set a default CPT template and create post attribute´s display rules?

Try naming it single-books.php. Normally when you register a post type it’s plural. Use the exact wording you registered the CPT with in your register_custom_postype. I like to use namespacing to avoid these issues all the same. SO register wpse_books as the post type and then your single would be single-wpse_books.php and archive would be … Read more

How to prevent post to repeat on my loop?

As mentioned in comment by @Michael, offset does not work with ‘posts_per_page’ => -1 You can possibly use increment to make first slide as active, in a single loop. Use this <div class=”carousel-inner” role=”listbox”> <?php $the_query = new WP_Query(array( ‘post_type’ => ‘Banners’, ‘posts_per_page’ => -1 )); $i = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); … Read more