Skip to content

Commit dbc9b9a

Browse files
committed
limit to posts
1 parent 6264a37 commit dbc9b9a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

multiloquent-base.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,14 +898,14 @@ public function multiloquent_category_list_as_hierarchy($cat = '0')
898898
public function multiloquent_paralax_slider()
899899
{
900900
global $wpdb;
901-
$total_posts = '5';
901+
$total_posts = '10';
902902

903903
if (function_exists('get_tptn_pop_posts')) {
904904
$args = array(
905905
'daily' => false,
906906
'strict_limit' => true,
907907
'posts_only' => false,
908-
'limit' => 5,
908+
'limit' => $total_posts,
909909
'posts_only' => true,
910910
);
911911
// todo - this needs to be an array of objects..
@@ -921,6 +921,15 @@ public function multiloquent_paralax_slider()
921921
} elseif (defined('WPSEO_VERSION')) {
922922
$posts_to_get = $this->multiloqient_get_post_id_by_meta_key_and_value('_yoast_wpseo_is_cornerstone', '1');
923923
$args = array(
924+
'numberposts' => $total_posts,
925+
'offset' => 0,
926+
'category' => '',
927+
'orderby' => 'post_date',
928+
'order' => 'DESC',
929+
'include' => '',
930+
'exclude' => '',
931+
'post_type' => 'post',
932+
'post_status' => 'publish',
924933
'post__in' => $posts_to_get,
925934
);
926935
$recent_posts = get_posts($args);
@@ -938,7 +947,7 @@ public function multiloquent_paralax_slider()
938947
);
939948
$recent_posts = get_posts($args);
940949
}
941-
$count = 1;
950+
$count = 1;
942951
$output = '<div class="container-fluid mb">';
943952
foreach ($recent_posts as $val) {
944953
$slider_image = wp_get_attachment_image_src(get_post_thumbnail_id($val->ID), 'single-post-thumbnail');

0 commit comments

Comments
 (0)