Skip to content

Commit cfd15d4

Browse files
committed
Only limit the number of posts to account for the sticky blog on page1 of blog list
1 parent 0b5240b commit cfd15d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

themes/osi/functions.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,11 @@ function osi_query_offset( WP_Query &$query ) {
376376
return;
377377
}
378378

379+
// If this is a page and its not set as the page for posts, return.
380+
if ( (int) get_option( 'page_for_posts' ) !== (int) get_queried_object_id() ) {
381+
return;
382+
}
383+
379384
$offset = -1;
380385
$ppp = get_option( 'posts_per_page' );
381386

0 commit comments

Comments
 (0)