Skip to content

Instantly share code, notes, and snippets.

cfxd / class-membership.php
Created Feb 15, 2019 — forked from wturnerharris/class-membership.php
Class to make things members-only in WordPress.--This class depends on a custom capability called 'is_approved_member' for user member access and the custom post meta key '_members_only' as a post-level custom field.
View class-membership.php
* Custom class for WP_Membership routines.
* @package WP_Membership
* @since WP_Membership 0.1
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
View _quickview.scss.liquid
#quick-view {
display: flex;
height: 100%;
justify-content: flex-end;
flex-wrap: wrap;
position: relative;
-ms-overflow-style: -ms-autohiding-scrollbar;
.qv-product-images {
width: 60%;
height: auto;
cfxd / .gitignore
Created Feb 22, 2016
GIT ignore for WP setup
View .gitignore
# Ignore everything in the root except the "wp-content" directory.
cfxd / package.json
Created Feb 22, 2016
Knight Digital package.json starter
View package.json
"name": "knight_digital_starter",
"version": "1.0.0",
"author": "Knight Digital <>",
"scripts": {
"autoprefixer": "postcss -u autoprefixer -r static/dist/css/*",
"scss": "node-sass --output-style compressed -o static/dist/css static/src/scss",
"lint": "eslint static/src/js",
"uglify": "mkdir -p static/dist/js && uglifyjs static/src/js/*.js -m -o static/dist/js/app.js && uglifyjs static/src/js/*.js -m -c -o static/dist/js/app.min.js",
"imagemin": "imagemin static/src/img static/dist/img -p",
cfxd / disable_gforms_auto_scroll.php
Last active Aug 29, 2015 — forked from lekkerduidelijk/gist:4994751
Disable auto scrolling of Gravity Forms
View disable_gforms_auto_scroll.php
add_filter('gform_confirmation_anchor', '__return_false');
View wp-cli.txt
# Install wordpress
wp core download && wp core config --dbname=wordpress_test_db --dbuser=root && wp core install --url=http://localhost/wp-cli/ --title=Wordpress --admin_user=admin --admin_password=admin
# Install and activate Plugins
wp plugin install wordpress-importer --activate && wp plugin install contact-form-7 --activate
# Generate Posts
curl | wp post generate --post_content --count=10
# Activate a theme
cfxd / sticky_footer.html
Created Sep 19, 2014 — forked from aalaap/gist:3066704
Sticky footer for Bootstrap
View sticky_footer.html
View test-plugin.php
* Plugin Name: AA Test Plugin
* Plugin URI:
* Description: Testing all kinds of things!
* Author: Richard Archambault
* Version: 1.0
* License: GPL2+
View tax_cpt_filter_class.php
if (!class_exists('Tax_CTP_Filter')){
* Tax CTP Filter Class
* Simple class to add custom taxonomy dropdown to a custom post type admin edit list
* @author Ohad Raz <>
* @version 0.1
class Tax_CTP_Filter
cfxd / dabblet.css
Last active Dec 20, 2015 — forked from oksushi/dabblet.css
Tableless horizontal navigation bar with padding and even spacing; no space between elements, no unused container space, and no fixed width (so works for any number of elements!).Fiddle at
View dabblet.css
* Using display: table-cell to evenly determine widths. You can add an arbitrary number of <li>
ul {
padding: 0;
display: table;
width: 100%;
table-layout: fixed;
You can’t perform that action at this time.