How to fix wordpress wp_get_archives() function problem
-
Hello everyone,
I’ve created a bikini girls blog at https://bikinigirlsgalore.com and I’m having a problem with the homepage.
You see, I’ve used the wp_get_archives() function at the bottom to list the months of the year and a post count in brackets. The output can be seen at the bottom in the links section underneath the homepage thumbnails.
The problem is that when I click on the month which is currently April(6). I’m having two problems actually.
1. The thumbnails on the landing page no longer link correctl to the posts pages.
2. The number of thumbnails that show up is only 5 but in actuality I have 6 confirmed posts with status published.
please help anyone,
below is my code.
sidebar.php
<div class="row"> <div class="col-sm-6"><nav class="navbar navbar-expand-sm bg-light"> <!-- Links --> <?php $args = array( 'type' => 'monthly', 'limit' => '', 'format' => 'custom', 'before' => '<li class="nav-item">', 'after' => '</li>', 'show_post_count' => true, 'echo' => 1, 'order' => 'ASC', 'post_type' => 'post' ); echo '<ul class="navbar-nav">'; wp_get_archives($args); echo '</ul>'; ?> <?php //wp_get_archives( 'type=monthly' ); ?> <?php //the_author_meta( 'description' ); ?> </nav> </div> <div class="col-sm-6"><nav class="navbar navbar-expand-sm bg-light"> <!-- Links --> <?php wp_list_pages( '&title_li=' ); ?> </nav> </div> </div>
- The topic ‘How to fix wordpress wp_get_archives() function problem’ is closed to new replies.