Skip to content

Commit a26f505

Browse files
authored
Merge pull request #8 from codehaiku/reference-settings-update
Reference settings update
2 parents 46b8ab8 + 9169acd commit a26f505

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

classes/reference-public.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,10 @@ public function setPostsPerPage($query)
440440
{
441441
$posts_per_page_option = Options::getPostsPerPage();
442442

443-
if (!is_admin() && $query->is_main_query()) {
444-
$query->set('posts_per_page', $posts_per_page_option);
443+
if (!is_admin() && $query->is_main_query() ) {
444+
if ( array_key_exists( 'post_type', $query->query ) && 'dsc-knowledgebase' === $query->query['post_type'] ) {
445+
$query->set('posts_per_page', $posts_per_page_option);
446+
}
445447
}
446448
return;
447449
}
@@ -580,7 +582,7 @@ public function isOptionTrue($key = '')
580582
if ( ! empty( $option) ) {
581583
return true;
582584
}
583-
585+
584586
return false;
585587
}
586588
/**

reference-wordpress-knowledgebase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin URI: https://wordpress.org/plugins/reference-wordpress-knowledgebase/
55
* Description: A lightweight knowledgebase plugin for your WordPress
66
* website. Works with any theme.
7-
* Version: 1.0.0
7+
* Version: 1.0.1
88
* Author: Dunhakdis
99
* Author URI: https://profiles.wordpress.org/dunhakdis/
1010
* Text Domain: reference
@@ -48,7 +48,7 @@
4848

4949
/**
5050
* Clear permalink on plugin activate.
51-
*
51+
*
5252
* @return void
5353
*/
5454
function reference_activate()

0 commit comments

Comments
 (0)