FLOE-555: Sidebar post query only returns 9 posts

Metadata

Source
FLOE-555
Type
Bug
Priority
Major
Status
Open
Resolution
N/A
Assignee
N/A
Reporter
Jonathan Hung
Created
2018-07-05T12:32:34.922-0400
Updated
2018-07-05T12:33:49.775-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Accessible Wordpress Theme

Description

The sidebar navigation only lists 9 posts for a category, even though there may be more.

A posts per page argument should be added to the query to return all items in sidebar.php:

if ( ! empty( $category_current ) ) {
 $args = array(
 // get posts belonging to the current category.
 'post_type' => 'post',
 'posts_per_page'=>-1,
 'category_name' => $category_current[0]->slug,
 );
 $sidebar_query = new WP_Query($args);