File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff 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 /**
Original file line number Diff line number Diff line change 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
4848
4949/**
5050 * Clear permalink on plugin activate.
51- *
51+ *
5252 * @return void
5353 */
5454function reference_activate ()
You can’t perform that action at this time.
0 commit comments