Include pagination in my custom blogs page
-
I have created a custom theme for my website and have named it simplepv. I have a custom home page and a separate page to show all my blog posts. But I can’t integrate pagination feature to my custom blogs page. I have searched it over the net and among the forums but couldn’t find a solution to my problem. I don’t have any function for pagination in my function.php, don’t I need to add one? I have placed my code below, Any help is really appreciated.
<?php /* Template Name: Blogs */ ?> <?php get_header(); ?> <section> <?php $my_query = "showposts=4"; $my_query = new WP_Query($my_query); ?> <?php if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php the_title() ?> <?php the_excerpt('') ?> <?php endwhile; // end of one post ?> <?php endif; //end of loop ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php endwhile; endif; ?> </section> <div style="height:10px;"> </div> </div> <?php get_footer(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Include pagination in my custom blogs page’ is closed to new replies.