https://github.com/wpperformance/wp-performance-snippet-variation
Snippet Variation for use related snippets block
https://github.com/wpperformance/wp-performance-snippet-variation
gutenberg gutenberg-blocks wordpress
Last synced: about 2 months ago
JSON representation
Snippet Variation for use related snippets block
- Host: GitHub
- URL: https://github.com/wpperformance/wp-performance-snippet-variation
- Owner: wpperformance
- Created: 2022-11-14T09:55:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-14T12:39:19.000Z (over 3 years ago)
- Last Synced: 2025-01-11T01:26:26.889Z (over 1 year ago)
- Topics: gutenberg, gutenberg-blocks, wordpress
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Variation block exemple
You can create variation for core block and modify the query arguments.
I use it on [wp-performance.com](https://wp-performance.com).
Exemple on this page end => [https://wp-performance.com/snippet/desactiver-php-dans-les-repertoires-plugins-uploads-et-themes/](https://wp-performance.com/snippet/desactiver-php-dans-les-repertoires-plugins-uploads-et-themes/)
## Method
1 - Create variation block with javascript file => ```assets/block-variations.js```
2 - Change query arguments with filter hook for this variation namespace => ```index.php```
## Links page WP developer resources
- [https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/extending-the-query-loop-block/](https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/extending-the-query-loop-block/)