You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ A WordPress plugin that extends the core Query Loop block with advanced controls
8
8
9
9
When a Query Loop block is set to "Inherit query from template", you can now override the number of posts to display. This is useful when you want to show a different number of posts than the main query. Leave the field empty to use the default number of posts.
10
10
11
+
**Editor Preview**: The posts per page override is now reflected in the editor preview, making it easier to see how your content will appear without needing to preview or publish the page.
12
+
11
13
### 2. Hide on Paginated Pages
12
14
13
15
Toggle whether the query loop should be hidden when viewing page 2 or higher (when the `paged` query var is greater than 1). This is useful for creating layouts where different query loops appear on the first page vs subsequent pages.
@@ -35,6 +37,31 @@ Enable this option to automatically exclude posts that have been displayed by pr
35
37
-`npm run lint:css` - Lint CSS/SCSS files
36
38
-`npm run format` - Format all files
37
39
40
+
### Testing
41
+
42
+
The plugin includes end-to-end tests using Playwright and `@wordpress/scripts`.
43
+
44
+
#### Running Tests
45
+
46
+
1. Start the WordPress test environment:
47
+
```bash
48
+
npm run wp-env start
49
+
```
50
+
51
+
2. Run the tests:
52
+
```bash
53
+
npm run test:e2e
54
+
```
55
+
56
+
#### Additional Test Commands
57
+
58
+
-`npm run test:e2e:debug` - Run tests in debug mode
59
+
-`npm run test:e2e:watch` - Run tests in watch mode (reruns on changes)
60
+
-`npm run wp-env stop` - Stop the WordPress environment
61
+
-`npm run wp-env` - Access wp-env commands directly
62
+
63
+
See [tests/e2e/README.md](tests/e2e/README.md) for more details on the test setup and writing tests.
64
+
38
65
## Usage
39
66
40
67
1. Add a Query Loop block to your page or template
0 commit comments