Skip to content

Instantly share code, notes, and snippets.

@cfxd
cfxd / dabblet.css
Last active December 20, 2015 10:59 — 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 http://jsfiddle.net/VBcUM/2/
/**
* 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;
<?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 <admin@bainternet.info>
* @version 0.1
*/
class Tax_CTP_Filter
{
<?php
/*
* Plugin Name: AA Test Plugin
* Plugin URI: http://wordpress.org/extend/plugins/test
* Description: Testing all kinds of things!
* Author: Richard Archambault
* Version: 1.0
* License: GPL2+
*/
@cfxd
cfxd / sticky_footer.html
Created September 19, 2014 00:03 — forked from aalaap/gist:3066704
Sticky footer for Bootstrap
@cfxd
cfxd / wp-cli.txt
Last active August 29, 2015 14:06
# 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 --admin_email=youremail@domain.com
# Install and activate Plugins
wp plugin install wordpress-importer --activate && wp plugin install contact-form-7 --activate
# Generate Posts
curl http://loripsum.wpwolf.com | wp post generate --post_content --count=10
# Activate a theme
@cfxd
cfxd / disable_gforms_auto_scroll.php
Last active August 29, 2015 14:07 — forked from rutger1140/gist:4994751
Disable auto scrolling of Gravity Forms
<?php
add_filter('gform_confirmation_anchor', '__return_false');
?>
@cfxd
cfxd / package.json
Created February 22, 2016 16:26
Knight Digital package.json starter
{
"name": "knight_digital_starter",
"version": "1.0.0",
"author": "Knight Digital <info@knightdigital.se>",
"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
cfxd / .gitignore
Created February 22, 2016 16:31
GIT ignore for WP setup
**/node_modules
**/node_modules/**
.DS_Store
config.codekit
*.log
.htaccess
# Ignore everything in the root except the "wp-content" directory.
@cfxd
cfxd / _quickview.scss.liquid
Created August 12, 2018 14:55 — forked from kellyvaughn/_quickview.scss.liquid
Shopify Quick View
#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
cfxd / class-membership.php
Created February 15, 2019 12:46 — 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.
<?php
/**
* Custom class for WP_Membership routines.
*
*
* @package WP_Membership
* @since WP_Membership 0.1
*/
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))