puikinsh / Dazzling

Flat design WordPress WooCommerce theme developed using Bootstrap 3 and FlexSlider

Home Page:http://colorlib.com/wp/themes/dazzling/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dazzling Popular Posts Widget Code Issue

FreeWPTP opened this issue · comments

In the following file of Dazzling theme Popular Posts Widget

/dazzling/inc/popular-posts-widget.php

on line number 45 the following code is added

$recent_posts = new WP_Query(array('showposts' => $number, 'ignore_sticky_posts' => 1, 'post_status' => 'publish', 'order'=> 'DESC', 'showposts' => $number, 'meta_key' => 'post_views_count', 'orderby' => 'meta_value'));

In the above code it is declared 'showposts' => $number twice which is needed only once.