Skip to content

Instantly share code, notes, and snippets.

@Qubadi
Qubadi / gist:873411c75802df8e20716ce00f6f540b
Created February 16, 2024 21:16
Jetsmartfilters checkboxes list to switcher button
Add this snippet code to your snippet plugins. Create a HTML snippet, and paste in the code and save it.
Elevate your JetSmartFilters experience by converting traditional checkboxes list filters into modern,
intuitive switcher buttons. This comprehensive guide walks you through the process of integrating sleek toggle switches,
significantly improving the user interface and interaction on your WordPress site. Discover practical CSS and JavaScript
techniques to transform your filters, making your website not only more aesthetically pleasing but also enhancing usability.
Ideal for web developers and WordPress enthusiasts looking to modernize their site's filtering system with a stylish,
user-friendly approach.
__________________________________________________________________________________
@Qubadi
Qubadi / gist:8c22d1696218cf1bb212c3bd260e4c5f
Last active January 20, 2025 16:07
Jetsmartfilters radio input to switcher button
Add this snippet code to your snippet plugins. Create a HTML snippet, and paste in the code and save it.
Elevate your JetSmartFilters experience by converting traditional radio filters into modern,
intuitive switcher buttons. This comprehensive guide walks you through the process of integrating sleek toggle switches,
significantly improving the user interface and interaction on your WordPress site. Discover practical CSS and JavaScript
techniques to transform your filters, making your website not only more aesthetically pleasing but also enhancing usability.
Ideal for web developers and WordPress enthusiasts looking to modernize their site's filtering system with a stylish,
user-friendly approach.
__________________________________________________________________________________
<?php
function bkap_show_hide_persons_based_on_date( $data ) {
$persons_to_hide = array(
'84217' => array( // 84217 is product id
array(
'dates' => '2023-06-25,2023-06-22', // in Y-m-d format.
'person_ids' => array( 84226, 84227 ), // 84226, 84227 are persons ids to hide
),
array(
@thamas
thamas / menu.html.twig
Last active October 3, 2018 14:16
Full template
{#
/**
* @file
* Theme override to display a menu.
*/
#}
{% import _self as menus %}
{#
We call a macro which calls itself to render the full tree.
@MindyPostoff
MindyPostoff / order-notes-required.php
Last active July 31, 2020 13:16
Make the Order Notes field required in the WooCommerce Checkout
// Place this code in your theme's functions.php file
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['order']['order_comments']['required'] = true;
return $fields;
}