Hello, I'm running wordpress on my site with the theme The Morning After. I understand that wordpress typically has a standard query of its own, however this theme uses a custom query to make its frontpage look a certain way. I'm fine with it, however I want it to be able to have a page 2. How do I modify it? ?php $the_query = new WP_Query('cat=-' .$catid. ',-' .$catid2. '&showposts=5&offset=1&orderby=post_date&order=desc'); ... while ($the_query->have_posts()) : $the_query->the_post(); Code (markup):
A bit unsure as to what you are asking here - do you want to make another page, as a separate page on the blog? For instance (given that it is the site in your signature), having a "go to page 2" or something like that? If so, it should be enough to just make another page on the blog, maybe you'll need to add the menu-structure (I don't know the theme) and use the same template for the second page? But maybe I've misunderstood what you want?
If you use the query: $the_query = new WP_Query('cat=-' .$catid. ',-' .$catid2. '&showposts=5&offset=1&orderby=post_date&order=desc'.'&paged='.$paged); Code (markup): it will automatically page the query based on the page number passed through the url eg "/page/4" However, this doesn't work with the “post_nav_link†function because it only checks the $wp_query variable. To get around this you have to trick the function by switching $wp_query on it. Add the first block before your custom loop and the second after to achieve this effect. <?php //query_posts('paged='.$paged); $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('cat=-' .$catid. ',-' .$catid2. '&showposts=5&offset=1&orderby=post_date&order=desc''.'&paged='.$paged); ?> Code (markup): <?php $wp_query = null; $wp_query = $temp;?> Code (markup): Then just remove all the "$the_query->"s mucking up your template file.