Archives Page not Showing all the Posts
-
I set up an archives page on my blog after learning how to do it without using a plugin. There’s only one problem: it shows only as many posts as on your homepage, i.e. what you’ve set in Admin area >> Settings >> Reading
I’d like to know what code I should add/change in order for it to archive all the posts. Here’s my archives.php file:
<?php
/*
Template Name: Archives
*/
?>
<?php while(have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1><h3>Categories</h3>
- <?php wp_list_cats(‘sort_column=name&optioncount=1’) ?>
<h3>Monthwise</h3>
- <?php wp_get_archives(‘type=monthly&show_post_count=1’) ?>
<?php endwhile; ?>
<?php
$posts_to_show = 100; //Max number of articles to display
$debut = 0; //The first article to be displayed
?>
<?php while(have_posts()) : the_post(); ?>
<h3>All Posts</h3>-
<?php
- <?php the_time(‘d/m/y’) ?>: “><?php the_title(); ?>
$myposts = get_posts(‘numberposts=$posts_to_show&offset=$debut’);
foreach($myposts as $post) :
?><?php endforeach; ?>
<?php endwhile; ?>
P.S: If you have time, please kindly also resolve my other query here
- The topic ‘Archives Page not Showing all the Posts’ is closed to new replies.