Skip to content

Instantly share code, notes, and snippets.

// Move Footer widgets and Footer outside Site Container
// Reposition the footer widgets
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
add_action( 'genesis_after', 'genesis_footer_widget_areas' );
// Reposition the footer
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
@srikat
srikat / functions.php
Last active February 17, 2016 02:45
How to replace Site Title text with custom HTML in Genesis.
<?php
//* Do NOT include the opening php tag
add_filter( 'genesis_seo_title', 'custom_genesis_seo_title', 10, 1 );
/**
* Replace Site Title text entered in Settings > Reading with custom HTML.
* @author Sridhar Katakam
* @link http://sridharkatakam.com/replace-site-title-text-custom-html-genesis/
*
* @param string original title text
@makfruit
makfruit / ecwid_payment_options_on_subtotal.html
Last active December 26, 2015 21:39
An HTML/Javascript code snippet for Ecwid to hide particular payment options depending on order subtotal
<script>
/*
* Hide or show payment methods in Ecwid depending on the order subtotal
* https://gist.github.com/makfruit/7217739
*/
/*yepnope1.5.x|WTFPL*/
(function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}functi
@makfruit
makfruit / ecwid_free_shipping_promo_in_cart.html
Last active March 22, 2016 14:06
An HTML/Javascript code snippet for Ecwid to show a simple promo message popup on the cart page for orders less than the defined subtotal
<!-- An HTML/Javascript code snippet for Ecwid to show a simple promo message popup on the cart page for orders less than the defined subtotal -->
<script>
if (typeof(Ecwid) == 'object') {
Ecwid.OnAPILoaded.add(function() {
var promoMessage = "Orders $99 and up ship free!";
var minSubtotal = 99;
var checkSubtotal = function(order) {
if (order) {
var subtotal = order.total - order.shipping;
@makfruit
makfruit / ecwid_add_size_chart_link.html
Last active June 6, 2017 08:16
An HTML/JS snippet for Ecwid to add a size chart link to the product details panel
@makfruit
makfruit / ecwid_preorder_for_unlimited_stock.html
Created December 5, 2012 11:19
A script for Ecwid to display the 'Preorder' label instead of 'In stock' when a product has unlimited stock quantity
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>
if (typeof(Ecwid) == 'object') {
Ecwid.OnAPILoaded.add(function() {
var preorderLabel = "Preorder";
function checkPreorder() {
if (
!jQuery(".ecwid-productBrowser-details-qtyAvailInfo").is(':visible')
&& jQuery(".ecwid-productBrowser-details-outOfStockLabel").length == 0
@manastungare
manastungare / css-compress.php
Created May 7, 2012 00:23
On-the-fly CSS Compression
<?php
/**
* On-the-fly CSS Compression
* Copyright (c) 2009 and onwards, Manas Tungare.
* Creative Commons Attribution, Share-Alike.
*
* In order to minimize the number and size of HTTP requests for CSS content,
* this script combines multiple CSS files into a single file and compresses
* it on-the-fly.
*