Skip to content

Instantly share code, notes, and snippets.

View wplit's full-sized avatar
💭
I may be slow to respond.

David Browne wplit

💭
I may be slow to respond.
View GitHub Profile
@wplit
wplit / style.css
Last active October 22, 2025 23:52
Show only the add to cart button in Fluent Carts Buy Section element (add to CSS settings on Buy Section element)
/* hide variant container, quantity, price */
%root% .fc-product-variants,
%root% .fc-product-quantity-container,
%root% .fc-product-item-price {
display: none!important;
}
/*
// optionally hide the buy now button
@wplit
wplit / code-block.js
Last active October 6, 2025 01:08
adding attributes to elements inside carousel builder
jQuery(document).ready(function($) {
let carouselSelector = '.my-carousel'; /* change to class of your carousel element */
/* get the flickity instance to control the carousel */
let $carousel = $(carouselSelector).find($(carouselSelector).children().data('carousel'));
let flkty = $carousel.data('flickity');
// 1. Update aria-current on image as carousel moves -----
@wplit
wplit / footer-scripts.html
Last active September 26, 2025 03:25
change text inside accordion item when expanded/closed
@wplit
wplit / footer-scripts.html
Last active September 26, 2025 00:45
change captions programmatically in Media Player (depending on lang attribute added to html element by Polylang)
@wplit
wplit / footer-scripts.html
Last active September 18, 2025 22:43
download QR Code SVG when button clicked (add to page settings > custom code > footer scripts)
@wplit
wplit / footer-scripts.html
Last active September 16, 2025 01:17
close modal when wpgb rendered new content (ie the filters have been used)
@wplit
wplit / footer-scripts.html
Last active September 6, 2025 01:11
move slider when clicked
@wplit
wplit / style.css
Last active September 5, 2025 00:16
make search button visible and add svg icon as background
.pp-header__search input.search-submit {
clip: auto;
height: 60%;
width: 5rem;
background-color: transparent;
right: 0;
font-size: 0;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26' fill='none'><path d='M10.8181 1C8.87623 1 6.97801 1.57582 5.36344 2.65464C3.74887 3.73346 2.49046 5.26683 1.74736 7.06084C1.00425 8.85485 0.809824 10.8289 1.18866 12.7334C1.56749 14.638 2.50257 16.3874 3.87565 17.7604C5.24872 19.1335 6.99813 20.0686 8.90265 20.4474C10.8072 20.8263 12.7812 20.6318 14.5753 19.8887C16.3693 19.1456 17.9026 17.8872 18.9815 16.2727C20.0603 14.6581 20.6361 12.7599 20.6361 10.818C20.6359 8.21418 19.6015 5.71702 17.7603 3.87582C15.9191 2.03462 13.4219 1.00017 10.8181 1Z' stroke='%23121212' stroke-width='1.5' stroke-miterlimit='10'/><path d='M18.1428 18.1431L24.9996 24.9999' stroke='%23121212' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round'/></svg>");
background-repeat: no-repea
@wplit
wplit / footer-scripts.html
Last active September 1, 2025 23:16
find any <video> or iframes inside tabs and reset when tabs swiched
@wplit
wplit / footer-scripts.html
Last active August 13, 2025 08:30
move table of contents between two blocks dependong on window size