Skip to content

Instantly share code, notes, and snippets.

View erwinprasetyo's full-sized avatar

Erwin Prasetyo erwinprasetyo

View GitHub Profile
<?php
wp_reset_query();
global $withcomments;
$withcomments = 1;
comments_template( '', true );
@erwinprasetyo
erwinprasetyo / number-input-tweak.js
Created December 24, 2016 06:49 — forked from GavinJaynes/number-input-tweak.js
Change WooCommerce number input ( Quantity ) to use custom styles using JavaScript. This can be used for any number field with the step attribute.
// Nominate the containing selector
var parentSelector = $('.quantity');
// If it's on the page
if( parentSelector.length ) {
// Get the original HTML
var numberInputs = parentSelector.html();
// Change number to text
var textInputs = numberInputs.replace('type="number"', 'type="text"');
// Plus button
@erwinprasetyo
erwinprasetyo / gist:7a230b2fe61eb472f55b9ee7e40dcee8
Created December 24, 2019 10:17 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>