Skip to content

Instantly share code, notes, and snippets.

💻
<code />

Greg Rickaby gregrickaby

💻
<code />
Block or report user

Report or block gregrickaby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gregrickaby
gregrickaby / wds-back-to-top.js
Created Dec 2, 2015
WDS Javascript Back To Top
View wds-back-to-top.js
/**
* Back To Top.
*/
window.Back_To_Top = {};
( function( window, $, that ) {
// Private variables.
var minWidth = 768;
var minHeight = 200;
View wp-query-ref.php
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@gregrickaby
gregrickaby / disable-beaver-builder-global-padding-margin.php
Last active Oct 2, 2019
Disable Beaver Builder global padding and margin
View disable-beaver-builder-global-padding-margin.php
<?php
/**
* Set Beaver Builder defaults
*
* @param {object} $defaults The default settings.
* @param {object} $form)_type The module settings.
* @return $defaults
*/
function grd_set_bb_defaults( $defaults, $form_type ) {
@gregrickaby
gregrickaby / even_odd_classes.php
Last active Sep 24, 2019
Even odd classes in WordPress loop
View even_odd_classes.php
<?php
// WP_Query Arguments
$args = array(
'order' => 'DESC',
'posts_per_page' => 5
);
// The Loop
$query = new WP_Query( $args );
@gregrickaby
gregrickaby / remove-woocommerce-styles-scripts.php
Last active Sep 20, 2019
Remove WooCommerce styles and scripts.
View remove-woocommerce-styles-scripts.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Manage WooCommerce styles and scripts.
*/
function grd_woocommerce_script_cleaner() {
// Remove the generator tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@gregrickaby
gregrickaby / wdsjQuery.js
Last active Sep 11, 2019
WDS Javascript Style
View wdsjQuery.js
/**
* file: wdsjQuery.js
*
* Handle Foo things for the foo theme.
*/
window.wdsFoo = {};
( function( window, $, app ) {
// Private variable.
var fooVariable = 'foo';
View html5-schema.org-markup.html
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
@gregrickaby
gregrickaby / composer.json
Created Jul 12, 2019
WDS New Project Composer Setup
View composer.json
{
"name": "foo-project/wordpress-wp-content",
"description": "Plugins and Theme to power the Foo Project website built atop WordPress.",
"type": "project",
"require": {
"webdevstudios/sso": "^2.0",
"webdevstudios/advanced-custom-fields-pro": "^5.8",
"yoast/wordpress-seo-premium": "^11.6",
"wpackagist-plugin/stream": "^3.3",
"webdevstudios/wp-migrate-db-pro": "^1.9",
You can’t perform that action at this time.