Skip to content

Instantly share code, notes, and snippets.

View gecugamo's full-sized avatar

Gary Cuga-Moylan gecugamo

View GitHub Profile
<?php
function products_query( $query )
{
if ( ! $query->is_main_query() || is_admin() )
{
return $query;
}
if ( is_post_type_archive( 'product' ) || is_tax())
{
@gecugamo
gecugamo / back-to-top.js
Last active November 30, 2015 16:47
Simple Back to Top
(function IIFE($) {
$('.back-to-top').on('click', function(e) {
e.preventDefault();
$('html, body').animate({
scrollTop: 0
}, 500);
});
})(jQuery);
@gecugamo
gecugamo / Gruntfile.js
Last active March 18, 2021 19:53
Gruntfile.js with sass, postcss, concat, uglify, and watch
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
sourcemap: 'inline'
},
files: {
'dist/css/style.css' : 'src/scss/style.scss'
@gecugamo
gecugamo / Gruntfile.js
Last active December 18, 2015 02:54
Gruntfile.js with SASS and PostCSS
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
sourcemap: 'none'
},
files: {
'assets/css/style.css': 'assets/scss/main.scss'