From c1b93c099106c0ffa2e57e77bc32dec7632db3ae Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Mon, 6 Apr 2026 19:38:40 +0530 Subject: [PATCH 1/4] fix: use main query for archive --- inc/Core.php | 17 +++++++++++++++++ templates/archive.html | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/inc/Core.php b/inc/Core.php index bfae19b..66f741a 100644 --- a/inc/Core.php +++ b/inc/Core.php @@ -55,6 +55,7 @@ private function run_hooks() { add_action( 'after_setup_theme', array( $this, 'setup' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) ); add_action( 'enqueue_block_editor_assets', array( $this, 'add_editor_styles' ) ); + add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) ); } /** @@ -107,4 +108,20 @@ public function enqueue() { public function add_editor_styles() { Assets_Manager::enqueue_style( Assets_Manager::ASSETS_SLUGS['editor-css'], 'editor' ); } + + /** + * Modify the main query before it is executed. + * + * @param \WP_Query $query The WP_Query instance (passed by reference). + */ + public function pre_get_posts( $query ) { + // Only modify frontend main query. + if ( is_admin() || ! $query->is_main_query() ) { + return; + } + + if ( $query->is_archive() ) { + $query->set( 'posts_per_page', 4 ); + } + } } diff --git a/templates/archive.html b/templates/archive.html index 0dcda42..91e47dd 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -23,7 +23,7 @@
- +
From 5fb4da702da2c6a11f4ac6e93573ff30e714ff23 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Mon, 6 Apr 2026 19:47:04 +0530 Subject: [PATCH 2/4] fix: enhance pre_get_posts to exclude feed queries --- inc/Core.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/Core.php b/inc/Core.php index 66f741a..5fe35e4 100644 --- a/inc/Core.php +++ b/inc/Core.php @@ -112,11 +112,11 @@ public function add_editor_styles() { /** * Modify the main query before it is executed. * - * @param \WP_Query $query The WP_Query instance (passed by reference). + * @param \WP_Query $query The WP_Query instance. */ - public function pre_get_posts( $query ) { + public function pre_get_posts( \WP_Query $query ) { // Only modify frontend main query. - if ( is_admin() || ! $query->is_main_query() ) { + if ( is_admin() || ! $query->is_main_query() || $query->is_feed() ) { return; } From 22826cf79f11259a9b0f91af60397883d9474ce3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 09:45:27 +0000 Subject: [PATCH 3/4] chore(deps): bump codeinwp/themeisle-sdk from 3.3.48 to 3.3.51 Bumps [codeinwp/themeisle-sdk](https://github.com/Codeinwp/themeisle-sdk) from 3.3.48 to 3.3.51. - [Release notes](https://github.com/Codeinwp/themeisle-sdk/releases) - [Changelog](https://github.com/Codeinwp/themeisle-sdk/blob/v3.3.51/CHANGELOG.md) - [Commits](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.48...v3.3.51) --- updated-dependencies: - dependency-name: codeinwp/themeisle-sdk dependency-version: 3.3.51 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index 2310048..d921d6d 100644 --- a/composer.lock +++ b/composer.lock @@ -8,21 +8,21 @@ "packages": [ { "name": "codeinwp/themeisle-sdk", - "version": "3.3.48", + "version": "3.3.51", "source": { "type": "git", "url": "https://github.com/Codeinwp/themeisle-sdk.git", - "reference": "0727d2cf2fc9bfb81b42968aeaf2bf4e340f021e" + "reference": "bb2a8414b0418b18c68c9ff1df3d7fb10467928d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/0727d2cf2fc9bfb81b42968aeaf2bf4e340f021e", - "reference": "0727d2cf2fc9bfb81b42968aeaf2bf4e340f021e", + "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/bb2a8414b0418b18c68c9ff1df3d7fb10467928d", + "reference": "bb2a8414b0418b18c68c9ff1df3d7fb10467928d", "shasum": "" }, "require-dev": { "codeinwp/phpcs-ruleset": "dev-main", - "yoast/phpunit-polyfills": "^2.0" + "yoast/phpunit-polyfills": "^4.0" }, "type": "library", "notification-url": "https://packagist.org/downloads/", @@ -36,16 +36,16 @@ "homepage": "https://themeisle.com" } ], - "description": "ThemeIsle SDK", + "description": "Themeisle SDK.", "homepage": "https://github.com/Codeinwp/themeisle-sdk", "keywords": [ "wordpress" ], "support": { "issues": "https://github.com/Codeinwp/themeisle-sdk/issues", - "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.48" + "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.51" }, - "time": "2025-08-11T16:47:24+00:00" + "time": "2026-03-30T07:58:49+00:00" } ], "packages-dev": [ @@ -2418,5 +2418,5 @@ "platform-overrides": { "php": "7.0" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From f542994ba1fa03d4356ee16989d5eb5d7eabb300 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 11:31:57 +0000 Subject: [PATCH 4/4] chore(deps): bump codeinwp/themeisle-sdk from 3.3.51 to 3.3.52 Bumps [codeinwp/themeisle-sdk](https://github.com/Codeinwp/themeisle-sdk) from 3.3.51 to 3.3.52. - [Release notes](https://github.com/Codeinwp/themeisle-sdk/releases) - [Changelog](https://github.com/Codeinwp/themeisle-sdk/blob/v3.3.52/CHANGELOG.md) - [Commits](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.51...v3.3.52) --- updated-dependencies: - dependency-name: codeinwp/themeisle-sdk dependency-version: 3.3.52 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index d921d6d..c7a179b 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "codeinwp/themeisle-sdk", - "version": "3.3.51", + "version": "3.3.52", "source": { "type": "git", "url": "https://github.com/Codeinwp/themeisle-sdk.git", - "reference": "bb2a8414b0418b18c68c9ff1df3d7fb10467928d" + "reference": "d1ae68cbd4f84934b4d982e9eeff317b9f4c814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/bb2a8414b0418b18c68c9ff1df3d7fb10467928d", - "reference": "bb2a8414b0418b18c68c9ff1df3d7fb10467928d", + "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/d1ae68cbd4f84934b4d982e9eeff317b9f4c814a", + "reference": "d1ae68cbd4f84934b4d982e9eeff317b9f4c814a", "shasum": "" }, "require-dev": { @@ -43,9 +43,9 @@ ], "support": { "issues": "https://github.com/Codeinwp/themeisle-sdk/issues", - "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.51" + "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.52" }, - "time": "2026-03-30T07:58:49+00:00" + "time": "2026-05-14T19:43:56+00:00" } ], "packages-dev": [