Site icon Hip-Hop Website Design and Development

Find out how to add Pagination to foreach loop to web page

I create a web page in wordpress collection.php and right here it the code the place I block!

    <?php 
        $classes=get_categories(
            array( 'dad or mum' => $cat->cat_ID)
        );

        foreach ($classes as $c) {
            // what you really need as an alternative of var_dump is one thing to
            // to create markup-- listing gadgets possibly, For instance
            $idp = $c->term_taxonomy_id;
            //then i get the information from the database
            $cat_data = get_option("category_".$idp);
        ?>      

        <div class="wide-box">
            <!-- Content material Element Field -->
            <a href="<?php echo get_category_link( $idp ); ?>" class="wb-image"><img src="<?php echo $cat_data['original_img']; ?>"></a>
            <!-- Wb Middle -->
            <div class="wb-center">
                <h3 class="wb-name"><a href="<?php echo get_category_link( $idp ); ?>"><?php echo $c->title; ?></a></h3>
                <div class="wb-details">
                    Genres : <?php echo $cat_data['genres']; ?><br>
                    Nation : <?php echo $cat_data['country']; ?><br>
                    Language : <?php echo $cat_data['language']; ?><br>
                    12 months : <?php echo $cat_data['year']; ?>
                </div>
                <div class="latest-label">Newest Episode:</div>
                <?php
                    $catquery = new WP_Query( 'cat='.$idp.'&posts_per_page=1' );
                    whereas($catquery->have_posts()) : $catquery->the_post();
                ?>
                    <a href="<?php the_permalink() ?>" class="latest-ep"><?php the_title(); ?></a>
                <?php endwhile; ?>
            </div>
            <!-- Wb Middle -->
        </div>      

    <?php                   
        }
    ?>
    </div>

So the way to add paging for loop to point out it?