Skip to content

Instantly share code, notes, and snippets.

IsraelOrtuno / dropdown-megamenu.scss
Last active May 2, 2019
Bootstrap 4 Megamenu dropdown
View dropdown-megamenu.scss
// Mega menu canvas
.dropdown--canvas {
// Reset margin and padding
.dropdown-menu {
left : auto;
padding : 0;
margin : 0;
Miq3l / functions.php
Last active Jun 22, 2021 — forked from SiR-DanieL/functions.php
Adding VAT to WooCommerce
View functions.php
/***************************** FRONTEND ****************************************/
Filter to add a VAT field to:
- My Account - Edit Form -- Billing fields
- Checkout - Edit Form - Billing Fields
This function is also reordering the form fields
nternetinspired / gist:7482445
Last active Feb 24, 2022
Load Disqus comments only on demand if you give a shit about page weight and your visitors. Even with no comments, i.e. an empty comment form, calling Disqus will load an extra 226Kb. If your page has comments this can be far higher. This Gist accompanies my blog post:
View gist:7482445
// Requires jQuery of course.
$(document).ready(function() {
$('.show-comments').on('click', function(){
var disqus_shortname = 'YOUR-DISQUS-USERNAME'; // Replace this value with *your* username.
// ajax request to load the disqus javascript
type: "GET",
url: "http://" + disqus_shortname + "",
dataType: "script",