I create a page in wordpress series.php and here it the code where I block!

            array( 'parent' => $cat->cat_ID)

        foreach ($categories as $c) {
            // what you really want instead of var_dump is something to
            // to create markup-- list items maybe, For example
            $idp = $c->term_taxonomy_id;
            //then i get the data from the database
            $cat_data = get_option("category_".$idp);

        <div class="wide-box">
            <!-- Content Detail Box -->
            <a href="<?php echo get_category_link( $idp ); ?>" class="wb-image"><img src="<?php echo $cat_data['original_img']; ?>"></a>
            <!-- Wb Center -->
            <div class="wb-center">
                <h3 class="wb-name"><a href="<?php echo get_category_link( $idp ); ?>"><?php echo $c->name; ?></a></h3>
                <div class="wb-details">
                    Genres : <?php echo $cat_data['genres']; ?><br>
                    Country : <?php echo $cat_data['country']; ?><br>
                    Language : <?php echo $cat_data['language']; ?><br>
                    Year : <?php echo $cat_data['year']; ?>
                <div class="latest-label">Latest Episode:</div>
                    $catquery = new WP_Query( 'cat='.$idp.'&posts_per_page=1' );
                    while($catquery->have_posts()) : $catquery->the_post();
                    <a href="<?php the_permalink() ?>" class="latest-ep"><?php the_title(); ?></a>
                <?php endwhile; ?>
            <!-- Wb Center -->


So how to add paging for loop to show it?


Add this argument to your WP_Query.

'paged' => get_query_var( 'paged' ),

And use a array style of arguments rather than a query post style.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.