- Add your query block, and give it a class of
is-style-carousel
. - Add the code from block-editor.php somewhere such as your child theme functions.php file.
- Configure Splide options in the
query_carousel_block_init()
function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Part: Blog | |
* | |
* @package CloudCatch\Sample | |
*/ | |
use function CloudCatch\Sample\get_post_icon; | |
$sample_blog_categories = wp_get_post_terms( get_the_ID(), 'category', array( 'fields' => 'names' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sandbox.local | |
recipe: wordpress | |
config: | |
php: 8.2 | |
webroot: www | |
services: | |
database: | |
type: mariadb | |
appserver: | |
xdebug: true |
- Install WSL
- Install your preferred WSL Linux Distro vom Microsoft Store. In my case I used Ubuntu 20.04.
- Install Docker for Windows
- Enable Docker WSL2 Integration
- Install Lando inside WSL
wget https://github.com/lando/lando/releases/download/v3.6.0/lando-x64-v3.6.0.deb
dpkg -i --ignore-depends=docker-ce lando-x64-v3.6.0.deb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add data attributes to the query block to describe the block query. | |
* | |
* @param string $block_content Default query content. | |
* @param array $block Parsed block. | |
* @return string | |
*/ | |
function query_render_block( $block_content, $block ) { | |
global $wp_query; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var waves = document.querySelectorAll('[data-wave]'); | |
var devicePixelRatio = window.devicePixelRatio || 1; | |
waves.forEach(function (wave) { | |
var fillColor = wave.getAttribute('data-fill') || '#f0f'; | |
var clipDirection = wave.getAttribute('data-clip-direction') || 'top'; | |
var containerWrapper = document.createElement('div'); | |
containerWrapper.classList = 'containerWrapper'; | |
var container = document.createElement('div'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WC Cart PDF template | |
* | |
* @package wc-cart-pdf | |
*/ | |
/** | |
* Before template hook | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Change the first item text in a WP menu to the users display name | |
* | |
* @param string $title The menu item's title. | |
* @param WP_Post $item The current menu item. | |
* @param stdClass $args An object of wp_nav_menu() arguments. | |
* @param int $depth Depth of menu item. Used for padding. | |
*/ | |
function wp_nav_menu_display_name( $title, $item, $args, $depth ) { | |
if( is_user_logged_in() ) { |