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 / footer-scripts.html
Last active July 16, 2025 05:30
remove columns if found emty from dynamic table (add to page settings > custom code > footer scripts)
@wplit
wplit / code.php
Last active July 14, 2025 06:40
limit number of results in any query loop
<?php
add_filter( 'bricks/query/result', function ( array $result, object $query_obj ): array {
$element_id = 'ejmwod'; // Element ID with query loop
$result_count = 1; // How many results to output
if ( $query_obj->element_id !== $element_id ) {
return $result;
}
@wplit
wplit / footer-scripts.html
Created July 14, 2025 03:45
remove <template> where Bricks isn't removing
@wplit
wplit / footer-scripts.html
Last active July 8, 2025 11:13
invisible control if active slide has no caption
@wplit
wplit / footer-scripts.html
Created June 27, 2025 00:31
do copy to clipboard on popover opening
@wplit
wplit / style.css
Created June 19, 2025 01:44
example CSS for moving aspect-ratio onto media-provider inside player
/* remove aspect ratio from player and set variable for controlling top margin */
%root% {
aspect-ratio: unset;
--player-controls-top: 6rem;
}
/* add aspect ratio to the media provider and set margins */
%root% media-provider {
position: relative;
@wplit
wplit / footer-scripts.html
Last active June 5, 2025 00:58
move focus automatically when modal open
@wplit
wplit / footer-scripts.html
Last active May 30, 2025 01:22
force iOS to display keyboard when header search open
@wplit
wplit / footer-scripts.html
Created May 21, 2025 23:06
re-run cursor when filter ajax ends
@wplit
wplit / footer-scripts.html
Last active May 20, 2025 23:54
add any image URLs to a lightbox gallery (page settings > custom code > footer scripts)