Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chuckreynolds's full-sized avatar
🤖
building things

Chuck Reynolds chuckreynolds

🤖
building things
View GitHub Profile
@chuckreynolds
chuckreynolds / functions.php
Created June 29, 2019 21:42 — forked from tessak22/functions.php
Hero Gutenberg Block using Advanced Custom Fields 5.8 Pro
/**
* Register hero block
*/
add_action('acf/init', 'hero');
function hero() {
// check function exists
if( function_exists('acf_register_block') ) {
// register a hero block
@chuckreynolds
chuckreynolds / Gravity Forms Reset Styles
Created October 14, 2016 18:17 — forked from forgeandsmith/Gravity Forms Reset Styles
Gravity Forms SCSS reset styles for easy style editing and management
///////////////////////////////////////////////
////// GRAVITY FORMS RESET STYLES //////
///////////////////////////////////////////////
// These styles are made in mind to be used with SCSS or LESS
// If you use these styles, you must go to the Gravity Forms settings in the WordPress back end and set Output CSS to No.
////----- Core Containers
.gform_heading,
.gform_body,
@chuckreynolds
chuckreynolds / norcross-debug-functions.php
Created March 10, 2016 19:10 — forked from norcross/norcross-debug-functions.php
my list of debugging functions to keep in an MU file
<?php
/*
Plugin Name: Norcross Debug Functions
Plugin URI: https://gist.github.com/norcross/7864205/
Description: A set of functions I use on all sites while building
Author: Andrew Norcross
Version: 0.0.1
Requires at least: 3.0
Author URI: http://andrewnorcross.com
*/
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
<?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(
@chuckreynolds
chuckreynolds / wordpress-filter-admin-published-default.php
Last active August 29, 2015 14:04 — forked from norcross/filter-pages-admin-link.php
This will make the WordPress admin menu link to posts and pages but with the Published filter active by default.
<?php
add_action ( 'admin_menu', 'rkv_filter_admin_published_default' );
function rkv_filter_admin_published_default() {
// call global submenu item
global $submenu;
// edit main link for posts
$submenu['edit.php'][5][2] = 'edit.php?post_status=publish';
@chuckreynolds
chuckreynolds / wordpress-remove-seo-columns.php
Last active March 29, 2020 06:17 — forked from norcross/remove-seo-columns.php
remove WordPress SEO columns from admin post tables
<?php
function rkv_remove_columns( $columns ) {
// remove the Yoast SEO columns
unset( $columns['wpseo-score'] );
unset( $columns['wpseo-title'] );
unset( $columns['wpseo-metadesc'] );
unset( $columns['wpseo-focuskw'] );
@chuckreynolds
chuckreynolds / wordpress-wp_query.php
Last active February 15, 2018 01:09 — forked from billerickson/gist:2047229
Improve performance of the WordPress WP_Query
<?php
$args = array(
// Normal query goes here //
'no_found_rows' => true, // counts posts, remove if pagination required
'update_post_term_cache' => false, // grabs terms, remove if terms required (category, tag...)
'update_post_meta_cache' => false, // grabs post meta, remove if post meta required
);
@chuckreynolds
chuckreynolds / dabblet.css
Created May 7, 2013 03:11 — forked from vasilisvg/dabblet.css
A simple menu with a :hover action
/**
* A simple menu with a :hover action
*/
html {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
font: 100%/2.5 helvetica, arial;
}