Skip to content

Instantly share code, notes, and snippets.

View salt-istanbul's full-sized avatar

Salt Hareket salt-istanbul

View GitHub Profile
<?php
/**
* ACF Form: Deregister ACF style
*/
add_action('wp_print_styles', 'hwk_acf_form_deregister_styles', 99);
function hwk_acf_form_deregister_styles(){
wp_deregister_style('acf');
wp_deregister_style('acf-field-group');
wp_deregister_style('acf-global');
@ciorici
ciorici / index.php
Created April 27, 2017 08:10
Featured Products Loop in WooCommerce 3.0
<ul class="products">
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => 12,
'tax_query' => array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
@Anthodpnt
Anthodpnt / video-masking.js
Last active December 14, 2022 22:51
Canvas - Video Masking
/**
* This gist is for Javascript beginners.
* @author: Anthony Du Pont <[email protected]>
* @site: https://www.twitter.com/JsGists
*
* You can do really cool effects with Canvas and I am going to show you how to use a video to mask
* and image with it. To be honest I am not really sure this gist is really for beginners but I really
* wanted to do it. So if you are not comfortable with the code below, take a minute, breathe and maybe
* start by reading the basics of Canvas. You will quickly start to notice this gist is not so difficult
* to understand.
@richardtorres314
richardtorres314 / flexbox.scss
Last active March 24, 2025 17:35
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
@salt-istanbul
salt-istanbul / Bootstrap Dot Pagination
Created October 28, 2014 12:17
Bootstrap Dot Pagination
/*
USAGE
Just add "pagination-dots" class name to your pagination...
*/
.pagination.pagination-dots{
background:none;
border:none;
}
.pagination.pagination-dots > li{
display:inline-block;
@salt-istanbul
salt-istanbul / Bootstrap Responsive Square & Rectangle
Last active October 27, 2016 16:44
Bootstrap Responsive Square & Rectangle
div[class*="col-"] > .square-responsive,
span[class*="col-"] > .square-responsive,
ol[class*="col-"] > .square-responsive,
ul[class*="col-"] > .square-responsive,
li[class*="col-"] > .square-responsive{
padding-bottom:100%;
}
div[class*="col-"] > .rect-responsive,
span[class*="col-"] > .rect-responsive,
ol[class*="col-"] > .rect-responsive,
@SimonPadbury
SimonPadbury / meganav.css
Last active August 29, 2015 14:07
Simple supplement to Bootstrap 3 navbar. Allows GRAND-CHILD links to be displayed in a mega-menu format. If no grand-child links, then child links are displayed as normal.
/*
Meganav
*/
@media (min-width: 768px) {
.navbar-brand,
.navbar-nav .caret {
display: none
}
/* Delete the above if you wish to display the caret */
@maxgalbu
maxgalbu / Switch_Node.php
Last active December 31, 2019 16:03
Switch tag for Twig, updated from https://github.com/fabpot/Twig/pull/185 to work with Twig >= 1.12
<?php
//To be added under Twig/Node/Switch.php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"