• Hello. I have a WP theme. It has all posts on the main page. I need to change categories instead posts with saved pagination and design. Can I fix it? If yes how? Thank you.

    <?php if ( have_posts() ) : ?>
    
                <div id="blog-grid" class="row content-grid">
                <?php while ( have_posts() ) : the_post(); ?>
                    <div class="<?php echo esc_attr( tdmacro_column_class() ); ?> post-box">
                    <?php get_template_part( 'content', get_post_format() ); ?>
                    </div><!-- .col -->
                <?php endwhile; ?>
                </div><!-- .row -->
    
                <?php tdmacro_paging_nav(); ?>
    
            <?php else : ?>
    
                <?php get_template_part( 'content', 'none' ); ?>
    
            <?php endif; ?>

    That’s the bit of code with standard WP loop. As I understand, the string get_template_part( ‘content’, get_post_format() ); gets the design of this page. And how can I make the loop for categories and get this design?

    p.s. sorry for my english

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Show categories instead posts on index page’ is closed to new replies.